@itwin/ecschema-rpcinterface-tests 4.10.0-dev.26 → 4.10.0-dev.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +814 -742
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61.bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -48351,7 +48351,7 @@ var ElementGeometry;
|
|
|
48351
48351
|
transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Transform.createRowValues(entityTransform.x00(), entityTransform.x01(), entityTransform.x02(), entityTransform.tx(), entityTransform.x10(), entityTransform.x11(), entityTransform.x12(), entityTransform.ty(), entityTransform.x20(), entityTransform.x21(), entityTransform.x22(), entityTransform.tz());
|
|
48352
48352
|
if (undefined !== localToWorld) {
|
|
48353
48353
|
if (undefined !== transform)
|
|
48354
|
-
|
|
48354
|
+
localToWorld.multiplyTransformTransform(transform, transform);
|
|
48355
48355
|
else
|
|
48356
48356
|
transform = localToWorld;
|
|
48357
48357
|
}
|
|
@@ -48384,7 +48384,7 @@ var ElementGeometry;
|
|
|
48384
48384
|
function fromBRep(brep, worldToLocal) {
|
|
48385
48385
|
if (undefined !== worldToLocal) {
|
|
48386
48386
|
const entityTrans = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Transform.fromJSON(brep.transform);
|
|
48387
|
-
const localTrans =
|
|
48387
|
+
const localTrans = worldToLocal.multiplyTransformTransform(entityTrans);
|
|
48388
48388
|
brep = {
|
|
48389
48389
|
data: brep.data,
|
|
48390
48390
|
type: brep.type,
|
|
@@ -48469,7 +48469,7 @@ var ElementGeometry;
|
|
|
48469
48469
|
if (null !== entityTransform)
|
|
48470
48470
|
transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Transform.createRowValues(entityTransform.x00(), entityTransform.x01(), entityTransform.x02(), entityTransform.tx(), entityTransform.x10(), entityTransform.x11(), entityTransform.x12(), entityTransform.ty(), entityTransform.x20(), entityTransform.x21(), entityTransform.x22(), entityTransform.tz());
|
|
48471
48471
|
if (undefined !== transform)
|
|
48472
|
-
|
|
48472
|
+
inputTransform.multiplyTransformTransform(transform, transform);
|
|
48473
48473
|
else
|
|
48474
48474
|
transform = inputTransform;
|
|
48475
48475
|
const transformOffset = _ElementGeometryFB__WEBPACK_IMPORTED_MODULE_3__.EGFBAccessors.Transform.createTransform(fbb, transform.matrix.coffs[0], transform.matrix.coffs[1], transform.matrix.coffs[2], transform.origin.x, transform.matrix.coffs[3], transform.matrix.coffs[4], transform.matrix.coffs[5], transform.origin.y, transform.matrix.coffs[6], transform.matrix.coffs[7], transform.matrix.coffs[8], transform.origin.z);
|
|
@@ -54012,7 +54012,7 @@ class GeometryStreamBuilder {
|
|
|
54012
54012
|
return true;
|
|
54013
54013
|
}
|
|
54014
54014
|
const entityTrans = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.fromJSON(brep.transform);
|
|
54015
|
-
const localTrans =
|
|
54015
|
+
const localTrans = this._worldToLocal.multiplyTransformTransform(entityTrans);
|
|
54016
54016
|
const localBrep = {
|
|
54017
54017
|
data: brep.data,
|
|
54018
54018
|
type: brep.type,
|
|
@@ -54238,7 +54238,7 @@ class GeometryStreamIterator {
|
|
|
54238
54238
|
else if (entry.brep) {
|
|
54239
54239
|
if (this.entry.localToWorld !== undefined) {
|
|
54240
54240
|
const entityTrans = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.fromJSON(entry.brep.transform);
|
|
54241
|
-
entry.brep.transform =
|
|
54241
|
+
entry.brep.transform = this.entry.localToWorld.multiplyTransformTransform(entityTrans).toJSON();
|
|
54242
54242
|
}
|
|
54243
54243
|
this.entry.setBRep(entry.brep);
|
|
54244
54244
|
return { value: this.entry, done: false };
|
|
@@ -54590,6 +54590,9 @@ class Placement3d {
|
|
|
54590
54590
|
return range;
|
|
54591
54591
|
}
|
|
54592
54592
|
/** Multiply the Transform of this Placement3d by the specified *other* Transform.
|
|
54593
|
+
* * Specifically `this.angles` is set to the rotation specified by `other.matrix * this.transform.matrix`
|
|
54594
|
+
* and `this.origin` is set to the origin of `other * this.transform`.
|
|
54595
|
+
* * Since the placement transform is local-to-world, this means `other` is a world-to-world transform.
|
|
54593
54596
|
* @throws [[IModelError]] if the Transform is invalid for a GeometricElement3d.
|
|
54594
54597
|
*/
|
|
54595
54598
|
multiplyTransform(other) {
|
|
@@ -66566,9 +66569,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
66566
66569
|
/* harmony import */ var _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Deserialization/XmlSerializationUtils */ "../../core/ecschema-metadata/lib/esm/Deserialization/XmlSerializationUtils.js");
|
|
66567
66570
|
/* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
|
|
66568
66571
|
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
|
|
66569
|
-
/* harmony import */ var
|
|
66570
|
-
/* harmony import */ var
|
|
66571
|
-
/* harmony import */ var _SchemaItem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
|
|
66572
|
+
/* harmony import */ var _OverrideFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OverrideFormat */ "../../core/ecschema-metadata/lib/esm/Metadata/OverrideFormat.js");
|
|
66573
|
+
/* harmony import */ var _SchemaItem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
|
|
66572
66574
|
/*---------------------------------------------------------------------------------------------
|
|
66573
66575
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
66574
66576
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -66582,11 +66584,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
66582
66584
|
|
|
66583
66585
|
|
|
66584
66586
|
|
|
66585
|
-
|
|
66586
66587
|
/** A Typescript class representation of a KindOfQuantity.
|
|
66587
66588
|
* @beta
|
|
66588
66589
|
*/
|
|
66589
|
-
class KindOfQuantity extends
|
|
66590
|
+
class KindOfQuantity extends _SchemaItem__WEBPACK_IMPORTED_MODULE_5__.SchemaItem {
|
|
66590
66591
|
/** The first presentation format in the list of Formats. */
|
|
66591
66592
|
get defaultPresentationFormat() { return this.presentationFormats[0]; }
|
|
66592
66593
|
/** A list of presentation formats. */
|
|
@@ -66609,57 +66610,6 @@ class KindOfQuantity extends _SchemaItem__WEBPACK_IMPORTED_MODULE_6__.SchemaItem
|
|
|
66609
66610
|
// TODO: Add some sort of validation?
|
|
66610
66611
|
(isDefault) ? this._presentationFormats.splice(0, 0, format) : this._presentationFormats.push(format);
|
|
66611
66612
|
}
|
|
66612
|
-
/** Parses the format string into the parts that make up an Override Format
|
|
66613
|
-
* @param formatString
|
|
66614
|
-
*/
|
|
66615
|
-
parseFormatString(formatString) {
|
|
66616
|
-
const match = formatString.split(_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_4__.formatStringRgx); // split string based on regex groups
|
|
66617
|
-
if (undefined === match[1])
|
|
66618
|
-
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The format string, ${formatString}, on KindOfQuantity '${this.fullName}' is missing a format.`);
|
|
66619
|
-
const returnValue = { name: match[1] };
|
|
66620
|
-
if (undefined !== match[2] && undefined !== match[3]) {
|
|
66621
|
-
const overrideString = match[2];
|
|
66622
|
-
const tokens = [];
|
|
66623
|
-
let prevPos = 1; // Initial position is the character directly after the opening '(' in the override string.
|
|
66624
|
-
let currPos;
|
|
66625
|
-
// TODO need to include `,` as a valid search argument.
|
|
66626
|
-
while (-1 !== (currPos = overrideString.indexOf(")", prevPos))) { // eslint-disable-line
|
|
66627
|
-
tokens.push(overrideString.substring(prevPos, currPos));
|
|
66628
|
-
prevPos = currPos + 1;
|
|
66629
|
-
}
|
|
66630
|
-
if (overrideString.length > 0 && undefined === tokens.find((token) => {
|
|
66631
|
-
return "" !== token; // there is at least one token that is not empty.
|
|
66632
|
-
})) {
|
|
66633
|
-
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, ``);
|
|
66634
|
-
}
|
|
66635
|
-
// The first override parameter overrides the default precision of the format
|
|
66636
|
-
const precisionIndx = 0;
|
|
66637
|
-
if (tokens.length >= precisionIndx + 1) {
|
|
66638
|
-
if (tokens[precisionIndx].length > 0) {
|
|
66639
|
-
const precision = Number.parseInt(tokens[precisionIndx], 10);
|
|
66640
|
-
if (Number.isNaN(precision))
|
|
66641
|
-
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The format string '${formatString}' on KindOfQuantity '${this.fullName}' has a precision override '${tokens[precisionIndx]}' that is not number.`);
|
|
66642
|
-
returnValue.precision = precision;
|
|
66643
|
-
}
|
|
66644
|
-
}
|
|
66645
|
-
}
|
|
66646
|
-
let i = 4;
|
|
66647
|
-
while (i < match.length - 1) { // The regex match ends with an empty last value, which causes problems when exactly 4 unit overrides as specified, so ignore this last empty value
|
|
66648
|
-
if (undefined === match[i])
|
|
66649
|
-
break;
|
|
66650
|
-
// Unit override required
|
|
66651
|
-
if (undefined === match[i + 1])
|
|
66652
|
-
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, ``);
|
|
66653
|
-
if (undefined === returnValue.unitAndLabels)
|
|
66654
|
-
returnValue.unitAndLabels = [];
|
|
66655
|
-
if (undefined !== match[i + 2]) // matches '|'
|
|
66656
|
-
returnValue.unitAndLabels.push([match[i + 1], match[i + 3] ?? ""]); // add unit name and label override (if '|' matches and next value is undefined, save it as an empty string)
|
|
66657
|
-
else
|
|
66658
|
-
returnValue.unitAndLabels.push([match[i + 1], undefined]); // add unit name
|
|
66659
|
-
i += 4;
|
|
66660
|
-
}
|
|
66661
|
-
return returnValue;
|
|
66662
|
-
}
|
|
66663
66613
|
/** Creates an OverrideFormat in the context of this KindOfQuantity.
|
|
66664
66614
|
* @param parent The Format to override.
|
|
66665
66615
|
* @param precision The precision override
|
|
@@ -66671,12 +66621,12 @@ class KindOfQuantity extends _SchemaItem__WEBPACK_IMPORTED_MODULE_6__.SchemaItem
|
|
|
66671
66621
|
if (parent.units && 0 === parent.units.length && unitLabelOverrides && 0 < unitLabelOverrides.length)
|
|
66672
66622
|
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `Cannot add a presentation format to KindOfQuantity '${this.name}' without any units and no unit overrides.`);
|
|
66673
66623
|
// TODO: Check compatibility of Unit overrides with the persistence unit
|
|
66674
|
-
return new
|
|
66624
|
+
return new _OverrideFormat__WEBPACK_IMPORTED_MODULE_4__.OverrideFormat(parent, precision, unitLabelOverrides);
|
|
66675
66625
|
}
|
|
66676
66626
|
async processPresentationUnits(presentationUnitsJson) {
|
|
66677
66627
|
const presUnitsArr = Array.isArray(presentationUnitsJson) ? presentationUnitsJson : presentationUnitsJson.split(";");
|
|
66678
66628
|
for (const formatString of presUnitsArr) {
|
|
66679
|
-
const presFormatOverride =
|
|
66629
|
+
const presFormatOverride = _OverrideFormat__WEBPACK_IMPORTED_MODULE_4__.OverrideFormat.parseFormatString(formatString);
|
|
66680
66630
|
const format = await this.schema.lookupItem(presFormatOverride.name);
|
|
66681
66631
|
if (undefined === format || format.schemaItemType !== _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.Format)
|
|
66682
66632
|
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `Unable to locate Format '${presFormatOverride.name}' for the presentation unit on KindOfQuantity ${this.fullName}.`);
|
|
@@ -66703,7 +66653,7 @@ class KindOfQuantity extends _SchemaItem__WEBPACK_IMPORTED_MODULE_6__.SchemaItem
|
|
|
66703
66653
|
processPresentationUnitsSync(presentationUnitsJson) {
|
|
66704
66654
|
const presUnitsArr = Array.isArray(presentationUnitsJson) ? presentationUnitsJson : presentationUnitsJson.split(";");
|
|
66705
66655
|
for (const formatString of presUnitsArr) {
|
|
66706
|
-
const presFormatOverride =
|
|
66656
|
+
const presFormatOverride = _OverrideFormat__WEBPACK_IMPORTED_MODULE_4__.OverrideFormat.parseFormatString(formatString);
|
|
66707
66657
|
const format = this.schema.lookupItemSync(presFormatOverride.name);
|
|
66708
66658
|
if (undefined === format || format.schemaItemType !== _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.Format)
|
|
66709
66659
|
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `Unable to locate Format '${presFormatOverride.name}' for the presentation unit on KindOfQuantity ${this.fullName}.`);
|
|
@@ -66750,7 +66700,7 @@ class KindOfQuantity extends _SchemaItem__WEBPACK_IMPORTED_MODULE_6__.SchemaItem
|
|
|
66750
66700
|
}
|
|
66751
66701
|
if (undefined !== this.presentationFormats) {
|
|
66752
66702
|
const presUnitStrings = this.presentationFormats.map((format) => {
|
|
66753
|
-
if (!
|
|
66703
|
+
if (!_OverrideFormat__WEBPACK_IMPORTED_MODULE_4__.OverrideFormat.isOverrideFormat(format))
|
|
66754
66704
|
return _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_1__.XmlSerializationUtils.createXmlTypedName(this.schema, format.schema, format.name);
|
|
66755
66705
|
return format.fullNameXml(this.schema);
|
|
66756
66706
|
});
|
|
@@ -66945,6 +66895,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
66945
66895
|
/* harmony export */ });
|
|
66946
66896
|
/* harmony import */ var _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Deserialization/XmlSerializationUtils */ "../../core/ecschema-metadata/lib/esm/Deserialization/XmlSerializationUtils.js");
|
|
66947
66897
|
/* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
|
|
66898
|
+
/* harmony import */ var _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @itwin/core-quantity */ "../../core/quantity/lib/esm/core-quantity.js");
|
|
66899
|
+
/* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
|
|
66948
66900
|
/*---------------------------------------------------------------------------------------------
|
|
66949
66901
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
66950
66902
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -66954,6 +66906,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
66954
66906
|
*/
|
|
66955
66907
|
|
|
66956
66908
|
|
|
66909
|
+
|
|
66910
|
+
|
|
66957
66911
|
/**
|
|
66958
66912
|
* Overrides of a Format, from a Schema, and is SchemaItem that is used specifically on KindOfQuantity.
|
|
66959
66913
|
* @beta
|
|
@@ -67022,6 +66976,57 @@ class OverrideFormat {
|
|
|
67022
66976
|
fullName += `[${unit.fullName}|${unitLabel}]`;
|
|
67023
66977
|
return fullName;
|
|
67024
66978
|
}
|
|
66979
|
+
/** Parses the format string into the parts that make up an Override Format
|
|
66980
|
+
* @param formatString
|
|
66981
|
+
*/
|
|
66982
|
+
static parseFormatString(formatString) {
|
|
66983
|
+
const match = formatString.split(_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_2__.formatStringRgx); // split string based on regex groups
|
|
66984
|
+
if (undefined === match[1])
|
|
66985
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The format string, ${formatString}, on KindOfQuantity is missing a format.`);
|
|
66986
|
+
const returnValue = { name: match[1] };
|
|
66987
|
+
if (undefined !== match[2] && undefined !== match[3]) {
|
|
66988
|
+
const overrideString = match[2];
|
|
66989
|
+
const tokens = [];
|
|
66990
|
+
let prevPos = 1; // Initial position is the character directly after the opening '(' in the override string.
|
|
66991
|
+
let currPos;
|
|
66992
|
+
// TODO need to include `,` as a valid search argument.
|
|
66993
|
+
while (-1 !== (currPos = overrideString.indexOf(")", prevPos))) { // eslint-disable-line
|
|
66994
|
+
tokens.push(overrideString.substring(prevPos, currPos));
|
|
66995
|
+
prevPos = currPos + 1;
|
|
66996
|
+
}
|
|
66997
|
+
if (overrideString.length > 0 && undefined === tokens.find((token) => {
|
|
66998
|
+
return "" !== token; // there is at least one token that is not empty.
|
|
66999
|
+
})) {
|
|
67000
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, ``);
|
|
67001
|
+
}
|
|
67002
|
+
// The first override parameter overrides the default precision of the format
|
|
67003
|
+
const precisionIndx = 0;
|
|
67004
|
+
if (tokens.length >= precisionIndx + 1) {
|
|
67005
|
+
if (tokens[precisionIndx].length > 0) {
|
|
67006
|
+
const precision = Number.parseInt(tokens[precisionIndx], 10);
|
|
67007
|
+
if (Number.isNaN(precision))
|
|
67008
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The format string '${formatString}' on KindOfQuantity has a precision override '${tokens[precisionIndx]}' that is not number.`);
|
|
67009
|
+
returnValue.precision = precision;
|
|
67010
|
+
}
|
|
67011
|
+
}
|
|
67012
|
+
}
|
|
67013
|
+
let i = 4;
|
|
67014
|
+
while (i < match.length - 1) { // The regex match ends with an empty last value, which causes problems when exactly 4 unit overrides as specified, so ignore this last empty value
|
|
67015
|
+
if (undefined === match[i])
|
|
67016
|
+
break;
|
|
67017
|
+
// Unit override required
|
|
67018
|
+
if (undefined === match[i + 1])
|
|
67019
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, ``);
|
|
67020
|
+
if (undefined === returnValue.unitAndLabels)
|
|
67021
|
+
returnValue.unitAndLabels = [];
|
|
67022
|
+
if (undefined !== match[i + 2]) // matches '|'
|
|
67023
|
+
returnValue.unitAndLabels.push([match[i + 1], match[i + 3] ?? ""]); // add unit name and label override (if '|' matches and next value is undefined, save it as an empty string)
|
|
67024
|
+
else
|
|
67025
|
+
returnValue.unitAndLabels.push([match[i + 1], undefined]); // add unit name
|
|
67026
|
+
i += 4;
|
|
67027
|
+
}
|
|
67028
|
+
return returnValue;
|
|
67029
|
+
}
|
|
67025
67030
|
/**
|
|
67026
67031
|
* @internal
|
|
67027
67032
|
*/
|
|
@@ -78658,14 +78663,14 @@ class SectionAttachment {
|
|
|
78658
78663
|
return this._drawingExtents.z;
|
|
78659
78664
|
}
|
|
78660
78665
|
get drawingRange() {
|
|
78661
|
-
const frustum3d = this._originalFrustum.transformBy(this.
|
|
78666
|
+
const frustum3d = this._originalFrustum.transformBy(this.toDrawing);
|
|
78662
78667
|
return frustum3d.toRange();
|
|
78663
78668
|
}
|
|
78664
78669
|
constructor(view, toDrawing, fromDrawing, toSheet) {
|
|
78665
78670
|
this._viewRect = new _common_ViewRect__WEBPACK_IMPORTED_MODULE_13__.ViewRect(0, 0, 1, 1);
|
|
78666
78671
|
this._originalFrustum = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Frustum();
|
|
78667
78672
|
// Save the input for clone(). Attach a copy to the viewport.
|
|
78668
|
-
this.
|
|
78673
|
+
this.toDrawing = toDrawing;
|
|
78669
78674
|
this._fromDrawing = fromDrawing;
|
|
78670
78675
|
this.viewport = _Viewport__WEBPACK_IMPORTED_MODULE_12__.OffScreenViewport.createViewport(view, new SectionTarget(this), true);
|
|
78671
78676
|
this.symbologyOverrides = new _render_FeatureSymbology__WEBPACK_IMPORTED_MODULE_8__.FeatureSymbology.Overrides(view);
|
|
@@ -78673,13 +78678,14 @@ class SectionAttachment {
|
|
|
78673
78678
|
let clip = this.view.getViewClip();
|
|
78674
78679
|
if (clip) {
|
|
78675
78680
|
clip = clip.clone();
|
|
78676
|
-
const clipTransform = toSheet ? toSheet.multiplyTransformTransform(this.
|
|
78681
|
+
const clipTransform = toSheet ? toSheet.multiplyTransformTransform(this.toDrawing) : this.toDrawing;
|
|
78677
78682
|
clip.transformInPlace(clipTransform);
|
|
78678
78683
|
clipVolume = _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.renderSystem.createClipVolume(clip);
|
|
78679
78684
|
}
|
|
78680
78685
|
this._branchOptions = {
|
|
78681
78686
|
clipVolume,
|
|
78682
78687
|
hline: view.getDisplayStyle3d().settings.hiddenLineSettings,
|
|
78688
|
+
viewAttachmentId: view.id,
|
|
78683
78689
|
frustum: {
|
|
78684
78690
|
is3d: true,
|
|
78685
78691
|
scale: { x: 1, y: 1 },
|
|
@@ -78689,7 +78695,7 @@ class SectionAttachment {
|
|
|
78689
78695
|
// Save off the original frustum (potentially adjusted by viewport).
|
|
78690
78696
|
this.viewport.setupFromView();
|
|
78691
78697
|
this.viewport.viewingSpace.getFrustum(_CoordSystem__WEBPACK_IMPORTED_MODULE_4__.CoordSystem.World, true, this._originalFrustum);
|
|
78692
|
-
const drawingFrustum = this._originalFrustum.transformBy(this.
|
|
78698
|
+
const drawingFrustum = this._originalFrustum.transformBy(this.toDrawing);
|
|
78693
78699
|
const drawingRange = drawingFrustum.toRange();
|
|
78694
78700
|
this._drawingExtents = drawingRange.diagonal();
|
|
78695
78701
|
this._drawingExtents.z = Math.abs(this._drawingExtents.z);
|
|
@@ -78704,7 +78710,7 @@ class SectionAttachment {
|
|
|
78704
78710
|
if (0 === pixelSize)
|
|
78705
78711
|
return;
|
|
78706
78712
|
// Adjust offscreen viewport's frustum based on intersection with drawing view frustum.
|
|
78707
|
-
const frustum3d = this._originalFrustum.transformBy(this.
|
|
78713
|
+
const frustum3d = this._originalFrustum.transformBy(this.toDrawing);
|
|
78708
78714
|
const frustumRange3d = frustum3d.toRange();
|
|
78709
78715
|
const frustum2d = context.viewport.getWorldFrustum();
|
|
78710
78716
|
const frustumRange2d = frustum2d.toRange();
|
|
@@ -78737,7 +78743,7 @@ class SectionAttachment {
|
|
|
78737
78743
|
graphics.symbologyOverrides = this.symbologyOverrides;
|
|
78738
78744
|
for (const graphic of source)
|
|
78739
78745
|
graphics.entries.push(graphic);
|
|
78740
|
-
const branch = context.createGraphicBranch(graphics, this.
|
|
78746
|
+
const branch = context.createGraphicBranch(graphics, this.toDrawing, this._branchOptions);
|
|
78741
78747
|
context.outputGraphic(branch);
|
|
78742
78748
|
};
|
|
78743
78749
|
outputGraphics(scene.foreground);
|
|
@@ -78910,6 +78916,17 @@ class DrawingViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__.ViewStat
|
|
|
78910
78916
|
get secondaryViewports() {
|
|
78911
78917
|
return this._attachment ? [this._attachment.viewport] : super.secondaryViewports;
|
|
78912
78918
|
}
|
|
78919
|
+
/** @internal */
|
|
78920
|
+
getAttachmentViewport(id) {
|
|
78921
|
+
return id === this._attachment?.view.id ? this._attachment.viewport : undefined;
|
|
78922
|
+
}
|
|
78923
|
+
/** @internal */
|
|
78924
|
+
computeDisplayTransform(args) {
|
|
78925
|
+
if (args.viewAttachmentId === undefined || args.viewAttachmentId !== this._attachment?.view.id) {
|
|
78926
|
+
return undefined;
|
|
78927
|
+
}
|
|
78928
|
+
return this._attachment.toDrawing;
|
|
78929
|
+
}
|
|
78913
78930
|
}
|
|
78914
78931
|
/** Exposed strictly for testing and debugging. Indicates that when loading the view, the spatial view should be displayed even
|
|
78915
78932
|
* if `SectionDrawing.displaySpatialView` is not `true`.
|
|
@@ -81616,8 +81633,7 @@ class HitDetail {
|
|
|
81616
81633
|
* @alpha
|
|
81617
81634
|
*/
|
|
81618
81635
|
get isClassifier() { return this._props.isClassifier; }
|
|
81619
|
-
/** Information about the
|
|
81620
|
-
* @note Only [[SheetViewState]]s can have view attachments.
|
|
81636
|
+
/** Information about the attached view within which the hit geometry resides, if any.
|
|
81621
81637
|
* @beta
|
|
81622
81638
|
*/
|
|
81623
81639
|
get viewAttachment() { return this._props.viewAttachment; }
|
|
@@ -92301,7 +92317,9 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__.ElementState {
|
|
|
92301
92317
|
get secondaryViewports() {
|
|
92302
92318
|
return [];
|
|
92303
92319
|
}
|
|
92304
|
-
/** Find the viewport that renders the contents of the view
|
|
92320
|
+
/** Find the viewport that renders the contents of the attached view with the specified element Id into this view.
|
|
92321
|
+
* For a sheet view, the Id refers to a ViewAttachment.
|
|
92322
|
+
* For a section drawing, it refers to a SpatialViewDefinition.
|
|
92305
92323
|
* @internal
|
|
92306
92324
|
*/
|
|
92307
92325
|
getAttachmentViewport(_id) {
|
|
@@ -93488,6 +93506,9 @@ class ViewingSpace {
|
|
|
93488
93506
|
zMax = Math.max(zMax, 1.0); // make sure we have at least +-1m. Data may be purely planar
|
|
93489
93507
|
delta.z = 2.0 * zMax;
|
|
93490
93508
|
origin.z = -zMax;
|
|
93509
|
+
const ds = this.view.displayStyle;
|
|
93510
|
+
if (ds.getIsBackgroundMapVisible() && undefined !== ds.getBackgroundMapGeometry())
|
|
93511
|
+
this.adjustZPlanes(origin, delta); // make sure view volume includes background map
|
|
93491
93512
|
}
|
|
93492
93513
|
else {
|
|
93493
93514
|
if (view.isCameraOn)
|
|
@@ -187475,7 +187496,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187475
187496
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
187476
187497
|
/* harmony export */ "AkimaCurve3d": () => (/* reexport safe */ _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_97__.AkimaCurve3d),
|
|
187477
187498
|
/* harmony export */ "AkimaCurve3dOptions": () => (/* reexport safe */ _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_97__.AkimaCurve3dOptions),
|
|
187478
|
-
/* harmony export */ "AnalyticRoots": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.AnalyticRoots),
|
|
187479
187499
|
/* harmony export */ "Angle": () => (/* reexport safe */ _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_0__.Angle),
|
|
187480
187500
|
/* harmony export */ "AngleSweep": () => (/* reexport safe */ _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_1__.AngleSweep),
|
|
187481
187501
|
/* harmony export */ "AnnotatedLineString3d": () => (/* reexport safe */ _curve_LineString3d__WEBPACK_IMPORTED_MODULE_73__.AnnotatedLineString3d),
|
|
@@ -187505,7 +187525,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187505
187525
|
/* harmony export */ "BezierCurveBase": () => (/* reexport safe */ _bspline_BezierCurveBase__WEBPACK_IMPORTED_MODULE_99__.BezierCurveBase),
|
|
187506
187526
|
/* harmony export */ "BezierPolynomialAlgebra": () => (/* reexport safe */ _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_51__.BezierPolynomialAlgebra),
|
|
187507
187527
|
/* harmony export */ "BilinearPatch": () => (/* reexport safe */ _geometry3d_BilinearPatch__WEBPACK_IMPORTED_MODULE_4__.BilinearPatch),
|
|
187508
|
-
/* harmony export */ "BilinearPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.BilinearPolynomial),
|
|
187509
187528
|
/* harmony export */ "BooleanClipFactory": () => (/* reexport safe */ _clipping_BooleanClipFactory__WEBPACK_IMPORTED_MODULE_38__.BooleanClipFactory),
|
|
187510
187529
|
/* harmony export */ "Box": () => (/* reexport safe */ _solid_Box__WEBPACK_IMPORTED_MODULE_88__.Box),
|
|
187511
187530
|
/* harmony export */ "BoxTopology": () => (/* reexport safe */ _polyface_BoxTopology__WEBPACK_IMPORTED_MODULE_110__.BoxTopology),
|
|
@@ -187547,9 +187566,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187547
187566
|
/* harmony export */ "CutLoop": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.CutLoop),
|
|
187548
187567
|
/* harmony export */ "CutLoopMergeContext": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.CutLoopMergeContext),
|
|
187549
187568
|
/* harmony export */ "DeepCompare": () => (/* reexport safe */ _serialization_DeepCompare__WEBPACK_IMPORTED_MODULE_127__.DeepCompare),
|
|
187550
|
-
/* harmony export */ "Degree2PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.Degree2PowerPolynomial),
|
|
187551
|
-
/* harmony export */ "Degree3PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.Degree3PowerPolynomial),
|
|
187552
|
-
/* harmony export */ "Degree4PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.Degree4PowerPolynomial),
|
|
187553
187569
|
/* harmony export */ "DirectSpiral3d": () => (/* reexport safe */ _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_85__.DirectSpiral3d),
|
|
187554
187570
|
/* harmony export */ "DuplicateFacetClusterSelector": () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_119__.DuplicateFacetClusterSelector),
|
|
187555
187571
|
/* harmony export */ "Ellipsoid": () => (/* reexport safe */ _geometry3d_Ellipsoid__WEBPACK_IMPORTED_MODULE_5__.Ellipsoid),
|
|
@@ -187560,7 +187576,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187560
187576
|
/* harmony export */ "FacetIntersectOptions": () => (/* reexport safe */ _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__.FacetIntersectOptions),
|
|
187561
187577
|
/* harmony export */ "FacetLocationDetailPair": () => (/* reexport safe */ _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__.FacetLocationDetailPair),
|
|
187562
187578
|
/* harmony export */ "FrameBuilder": () => (/* reexport safe */ _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_6__.FrameBuilder),
|
|
187563
|
-
/* harmony export */ "GaussMapper": () => (/* reexport safe */
|
|
187579
|
+
/* harmony export */ "GaussMapper": () => (/* reexport safe */ _numerics_Quadrature__WEBPACK_IMPORTED_MODULE_55__.GaussMapper),
|
|
187564
187580
|
/* harmony export */ "GeodesicPathPoint": () => (/* reexport safe */ _geometry3d_Ellipsoid__WEBPACK_IMPORTED_MODULE_5__.GeodesicPathPoint),
|
|
187565
187581
|
/* harmony export */ "GeodesicPathSolver": () => (/* reexport safe */ _geometry3d_Ellipsoid__WEBPACK_IMPORTED_MODULE_5__.GeodesicPathSolver),
|
|
187566
187582
|
/* harmony export */ "Geometry": () => (/* reexport safe */ _Geometry__WEBPACK_IMPORTED_MODULE_36__.Geometry),
|
|
@@ -187573,7 +187589,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187573
187589
|
/* harmony export */ "GrowableXYArray": () => (/* reexport safe */ _geometry3d_GrowableXYArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYArray),
|
|
187574
187590
|
/* harmony export */ "GrowableXYZArray": () => (/* reexport safe */ _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__.GrowableXYZArray),
|
|
187575
187591
|
/* harmony export */ "IModelJson": () => (/* reexport safe */ _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_126__.IModelJson),
|
|
187576
|
-
/* harmony export */ "ImplicitLineXY": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.ImplicitLineXY),
|
|
187577
187592
|
/* harmony export */ "IndexedCollectionInterval": () => (/* reexport safe */ _geometry3d_IndexedCollectionInterval__WEBPACK_IMPORTED_MODULE_13__.IndexedCollectionInterval),
|
|
187578
187593
|
/* harmony export */ "IndexedPolyface": () => (/* reexport safe */ _polyface_Polyface__WEBPACK_IMPORTED_MODULE_112__.IndexedPolyface),
|
|
187579
187594
|
/* harmony export */ "IndexedPolyfaceSubsetVisitor": () => (/* reexport safe */ _polyface_IndexedPolyfaceVisitor__WEBPACK_IMPORTED_MODULE_114__.IndexedPolyfaceSubsetVisitor),
|
|
@@ -187643,11 +187658,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187643
187658
|
/* harmony export */ "PolygonLocationDetailPair": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonLocationDetailPair),
|
|
187644
187659
|
/* harmony export */ "PolygonOps": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonOps),
|
|
187645
187660
|
/* harmony export */ "PolylineOps": () => (/* reexport safe */ _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_26__.PolylineOps),
|
|
187646
|
-
/* harmony export */ "PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.PowerPolynomial),
|
|
187647
187661
|
/* harmony export */ "ProxyCurve": () => (/* reexport safe */ _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_81__.ProxyCurve),
|
|
187648
|
-
/* harmony export */ "Quadrature": () => (/* reexport safe */
|
|
187662
|
+
/* harmony export */ "Quadrature": () => (/* reexport safe */ _numerics_Quadrature__WEBPACK_IMPORTED_MODULE_55__.Quadrature),
|
|
187649
187663
|
/* harmony export */ "Range1d": () => (/* reexport safe */ _geometry3d_Range__WEBPACK_IMPORTED_MODULE_28__.Range1d),
|
|
187650
|
-
/* harmony export */ "Range1dArray": () => (/* reexport safe */
|
|
187664
|
+
/* harmony export */ "Range1dArray": () => (/* reexport safe */ _numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_56__.Range1dArray),
|
|
187651
187665
|
/* harmony export */ "Range2d": () => (/* reexport safe */ _geometry3d_Range__WEBPACK_IMPORTED_MODULE_28__.Range2d),
|
|
187652
187666
|
/* harmony export */ "Range3d": () => (/* reexport safe */ _geometry3d_Range__WEBPACK_IMPORTED_MODULE_28__.Range3d),
|
|
187653
187667
|
/* harmony export */ "RangeBase": () => (/* reexport safe */ _geometry3d_Range__WEBPACK_IMPORTED_MODULE_28__.RangeBase),
|
|
@@ -187664,13 +187678,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187664
187678
|
/* harmony export */ "Sample": () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__.Sample),
|
|
187665
187679
|
/* harmony export */ "Segment1d": () => (/* reexport safe */ _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_31__.Segment1d),
|
|
187666
187680
|
/* harmony export */ "SerializationHelpers": () => (/* reexport safe */ _serialization_SerializationHelpers__WEBPACK_IMPORTED_MODULE_129__.SerializationHelpers),
|
|
187667
|
-
/* harmony export */ "
|
|
187668
|
-
/* harmony export */ "SmallSystem": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SmallSystem),
|
|
187681
|
+
/* harmony export */ "SmallSystem": () => (/* reexport safe */ _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_57__.SmallSystem),
|
|
187669
187682
|
/* harmony export */ "SmoothTransformBetweenFrusta": () => (/* reexport safe */ _geometry3d_FrustumAnimation__WEBPACK_IMPORTED_MODULE_7__.SmoothTransformBetweenFrusta),
|
|
187670
187683
|
/* harmony export */ "SolidPrimitive": () => (/* reexport safe */ _solid_SolidPrimitive__WEBPACK_IMPORTED_MODULE_93__.SolidPrimitive),
|
|
187671
187684
|
/* harmony export */ "SpacePolygonTriangulation": () => (/* reexport safe */ _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_125__.SpacePolygonTriangulation),
|
|
187672
187685
|
/* harmony export */ "Sphere": () => (/* reexport safe */ _solid_Sphere__WEBPACK_IMPORTED_MODULE_94__.Sphere),
|
|
187673
|
-
/* harmony export */ "SphereImplicit": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SphereImplicit),
|
|
187674
187686
|
/* harmony export */ "StandardViewIndex": () => (/* reexport safe */ _Geometry__WEBPACK_IMPORTED_MODULE_36__.StandardViewIndex),
|
|
187675
187687
|
/* harmony export */ "SteppedIndexFunctionFactory": () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__.SteppedIndexFunctionFactory),
|
|
187676
187688
|
/* harmony export */ "StringifiedClipVector": () => (/* reexport safe */ _clipping_ClipVector__WEBPACK_IMPORTED_MODULE_43__.StringifiedClipVector),
|
|
@@ -187680,14 +187692,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187680
187692
|
/* harmony export */ "SweepLineStringToFacetsOptions": () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_119__.SweepLineStringToFacetsOptions),
|
|
187681
187693
|
/* harmony export */ "TaggedNumericConstants": () => (/* reexport safe */ _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_124__.TaggedNumericConstants),
|
|
187682
187694
|
/* harmony export */ "TaggedNumericData": () => (/* reexport safe */ _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_124__.TaggedNumericData),
|
|
187683
|
-
/* harmony export */ "TorusImplicit": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.TorusImplicit),
|
|
187684
187695
|
/* harmony export */ "TorusPipe": () => (/* reexport safe */ _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_96__.TorusPipe),
|
|
187685
187696
|
/* harmony export */ "Transform": () => (/* reexport safe */ _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_32__.Transform),
|
|
187686
187697
|
/* harmony export */ "TransitionSpiral3d": () => (/* reexport safe */ _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_83__.TransitionSpiral3d),
|
|
187687
187698
|
/* harmony export */ "TriDiagonalSystem": () => (/* reexport safe */ _numerics_TriDiagonalSystem__WEBPACK_IMPORTED_MODULE_58__.TriDiagonalSystem),
|
|
187688
187699
|
/* harmony export */ "TriangleLocationDetail": () => (/* reexport safe */ _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_3__.TriangleLocationDetail),
|
|
187689
187700
|
/* harmony export */ "TriangularFacetLocationDetail": () => (/* reexport safe */ _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__.TriangularFacetLocationDetail),
|
|
187690
|
-
/* harmony export */ "TrigPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.TrigPolynomial),
|
|
187691
187701
|
/* harmony export */ "UVSelect": () => (/* reexport safe */ _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_106__.UVSelect),
|
|
187692
187702
|
/* harmony export */ "UVSurfaceOps": () => (/* reexport safe */ _geometry3d_UVSurfaceOps__WEBPACK_IMPORTED_MODULE_33__.UVSurfaceOps),
|
|
187693
187703
|
/* harmony export */ "UnionOfConvexClipPlaneSets": () => (/* reexport safe */ _clipping_UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_41__.UnionOfConvexClipPlaneSets),
|
|
@@ -187701,7 +187711,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187701
187711
|
/* harmony export */ "XYAndZ": () => (/* reexport safe */ _geometry3d_XYZProps__WEBPACK_IMPORTED_MODULE_34__.XYAndZ),
|
|
187702
187712
|
/* harmony export */ "XYZ": () => (/* reexport safe */ _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_23__.XYZ),
|
|
187703
187713
|
/* harmony export */ "YawPitchRollAngles": () => (/* reexport safe */ _geometry3d_YawPitchRollAngles__WEBPACK_IMPORTED_MODULE_35__.YawPitchRollAngles),
|
|
187704
|
-
/* harmony export */ "compareRange1dLexicalLowHigh": () => (/* reexport safe */
|
|
187714
|
+
/* harmony export */ "compareRange1dLexicalLowHigh": () => (/* reexport safe */ _numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_56__.compareRange1dLexicalLowHigh)
|
|
187705
187715
|
/* harmony export */ });
|
|
187706
187716
|
/* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
|
|
187707
187717
|
/* harmony import */ var _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./geometry3d/AngleSweep */ "../../core/geometry/lib/esm/geometry3d/AngleSweep.js");
|
|
@@ -187758,9 +187768,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187758
187768
|
/* harmony import */ var _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./numerics/ClusterableArray */ "../../core/geometry/lib/esm/numerics/ClusterableArray.js");
|
|
187759
187769
|
/* harmony import */ var _numerics_Complex__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./numerics/Complex */ "../../core/geometry/lib/esm/numerics/Complex.js");
|
|
187760
187770
|
/* harmony import */ var _numerics_PascalCoefficients__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./numerics/PascalCoefficients */ "../../core/geometry/lib/esm/numerics/PascalCoefficients.js");
|
|
187761
|
-
/* harmony import */ var
|
|
187762
|
-
/* harmony import */ var
|
|
187763
|
-
/* harmony import */ var
|
|
187771
|
+
/* harmony import */ var _numerics_Quadrature__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./numerics/Quadrature */ "../../core/geometry/lib/esm/numerics/Quadrature.js");
|
|
187772
|
+
/* harmony import */ var _numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./numerics/Range1dArray */ "../../core/geometry/lib/esm/numerics/Range1dArray.js");
|
|
187773
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
187764
187774
|
/* harmony import */ var _numerics_TriDiagonalSystem__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./numerics/TriDiagonalSystem */ "../../core/geometry/lib/esm/numerics/TriDiagonalSystem.js");
|
|
187765
187775
|
/* harmony import */ var _curve_Arc3d__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./curve/Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
187766
187776
|
/* harmony import */ var _curve_ConstructCurveBetweenCurves__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./curve/ConstructCurveBetweenCurves */ "../../core/geometry/lib/esm/curve/ConstructCurveBetweenCurves.js");
|
|
@@ -188110,20 +188120,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188110
188120
|
/* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
|
|
188111
188121
|
/* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
|
|
188112
188122
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
188113
|
-
/* harmony import */ var
|
|
188123
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
188114
188124
|
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
188115
|
-
/* harmony import */ var
|
|
188116
|
-
/* harmony import */ var
|
|
188125
|
+
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
188126
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
188127
|
+
/* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
188117
188128
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
188118
188129
|
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
188119
|
-
/* harmony import */ var
|
|
188120
|
-
/* harmony import */ var
|
|
188121
|
-
/* harmony import */ var
|
|
188130
|
+
/* harmony import */ var _internalContexts_CurveOffsetXYHandler__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./internalContexts/CurveOffsetXYHandler */ "../../core/geometry/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js");
|
|
188131
|
+
/* harmony import */ var _internalContexts_EllipticalArcApproximationContext__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./internalContexts/EllipticalArcApproximationContext */ "../../core/geometry/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js");
|
|
188132
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
188122
188133
|
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
188123
188134
|
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
188124
|
-
/* harmony import */ var
|
|
188125
|
-
/* harmony import */ var
|
|
188126
|
-
/* harmony import */ var
|
|
188135
|
+
/* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
|
|
188136
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
188137
|
+
/* harmony import */ var _StrokeOptions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
|
|
188127
188138
|
/*---------------------------------------------------------------------------------------------
|
|
188128
188139
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
188129
188140
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -188147,6 +188158,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188147
188158
|
|
|
188148
188159
|
|
|
188149
188160
|
|
|
188161
|
+
|
|
188150
188162
|
|
|
188151
188163
|
|
|
188152
188164
|
/**
|
|
@@ -188567,7 +188579,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
188567
188579
|
const ac2 = vectorAC.magnitudeSquared();
|
|
188568
188580
|
const normal = vectorAB.sizedCrossProduct(vectorAC, Math.sqrt(Math.sqrt(ab2 * ac2)));
|
|
188569
188581
|
if (normal) {
|
|
188570
|
-
const vectorToCenter =
|
|
188582
|
+
const vectorToCenter = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__.SmallSystem.linearSystem3d(normal.x, normal.y, normal.z, vectorAB.x, vectorAB.y, vectorAB.z, vectorAC.x, vectorAC.y, vectorAC.z, 0, // vectorToCenter DOT normal = 0 (ensure normal is perp to the plane of the 3 points)
|
|
188571
188583
|
0.5 * ab2, // vectorToCenter DOT vectorAB = ab2 / 2 (ensure the projection of vectorToCenter on AB bisects AB)
|
|
188572
188584
|
0.5 * ac2);
|
|
188573
188585
|
if (vectorToCenter) { // i.e., the negative of vectorX
|
|
@@ -188802,7 +188814,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
188802
188814
|
const uu = this._matrix.columnXMagnitudeSquared();
|
|
188803
188815
|
const uv = this._matrix.columnXDotColumnY();
|
|
188804
188816
|
const vv = this._matrix.columnYMagnitudeSquared();
|
|
188805
|
-
|
|
188817
|
+
_numerics_Polynomials__WEBPACK_IMPORTED_MODULE_13__.TrigPolynomial.solveUnitCircleImplicitQuadricIntersection(uv, vv - uu, -uv, this._matrix.dotColumnY(vectorQ), -this._matrix.dotColumnX(vectorQ), 0.0, radians);
|
|
188806
188818
|
if (endpoints) {
|
|
188807
188819
|
radians.push(this.sweep.startRadians);
|
|
188808
188820
|
radians.push(this.sweep.endRadians);
|
|
@@ -188819,14 +188831,14 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
188819
188831
|
closestPoint(spacePoint, extend, result) {
|
|
188820
188832
|
result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveLocationDetail.create(this, result);
|
|
188821
188833
|
const allRadians = this.allPerpendicularAngles(spacePoint, true, true);
|
|
188822
|
-
let extend0 =
|
|
188823
|
-
let extend1 =
|
|
188834
|
+
let extend0 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0);
|
|
188835
|
+
let extend1 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1);
|
|
188824
188836
|
// distinct extends for cyclic space are awkward ....
|
|
188825
188837
|
if (this._sweep.isFullCircle) {
|
|
188826
|
-
extend0 =
|
|
188827
|
-
extend1 =
|
|
188838
|
+
extend0 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendMode.None;
|
|
188839
|
+
extend1 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendMode.None;
|
|
188828
188840
|
}
|
|
188829
|
-
if (extend0 !==
|
|
188841
|
+
if (extend0 !== _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendMode.None && extend1 !== _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendMode.None) {
|
|
188830
188842
|
allRadians.push(this._sweep.startRadians);
|
|
188831
188843
|
allRadians.push(this._sweep.endRadians);
|
|
188832
188844
|
}
|
|
@@ -188840,7 +188852,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
188840
188852
|
let dMin = Number.MAX_VALUE;
|
|
188841
188853
|
let d = 0;
|
|
188842
188854
|
for (const radians of allRadians) {
|
|
188843
|
-
const fraction =
|
|
188855
|
+
const fraction = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendOptions.resolveRadiansToSweepFraction(extend, radians, this.sweep);
|
|
188844
188856
|
if (fraction !== undefined) {
|
|
188845
188857
|
this.fractionToPointAndDerivative(fraction, workRay);
|
|
188846
188858
|
d = spacePoint.distance(workRay.origin);
|
|
@@ -188952,7 +188964,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
188952
188964
|
* @param transform optional transform to apply to the arc.
|
|
188953
188965
|
*/
|
|
188954
188966
|
extendRangeInSweep(range, sweep, transform) {
|
|
188955
|
-
const trigForm = new
|
|
188967
|
+
const trigForm = new _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_13__.SineCosinePolynomial(0, 0, 0);
|
|
188956
188968
|
const center = this._center.clone(Arc3d._workPointA);
|
|
188957
188969
|
const vectorU = this._matrix.columnX(Arc3d._workVectorU);
|
|
188958
188970
|
const vectorV = this._matrix.columnY(Arc3d._workVectorV);
|
|
@@ -188963,7 +188975,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
188963
188975
|
}
|
|
188964
188976
|
const lowPoint = Arc3d._workPointB;
|
|
188965
188977
|
const highPoint = Arc3d._workPointC;
|
|
188966
|
-
const range1 =
|
|
188978
|
+
const range1 = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_15__.Range1d.createNull();
|
|
188967
188979
|
for (let i = 0; i < 3; i++) {
|
|
188968
188980
|
trigForm.set(center.at(i), vectorU.at(i), vectorV.at(i));
|
|
188969
188981
|
trigForm.rangeInSweep(sweep, range1);
|
|
@@ -188979,7 +188991,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
188979
188991
|
*/
|
|
188980
188992
|
rangeBetweenFractions(fraction0, fraction1, transform) {
|
|
188981
188993
|
const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_2__.AngleSweep.createStartEndRadians(this.sweep.fractionToRadians(fraction0), this.sweep.fractionToRadians(fraction1));
|
|
188982
|
-
const range =
|
|
188994
|
+
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_15__.Range3d.create();
|
|
188983
188995
|
this.extendRangeInSweep(range, sweep, transform);
|
|
188984
188996
|
return range;
|
|
188985
188997
|
}
|
|
@@ -188992,7 +189004,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
188992
189004
|
*/
|
|
188993
189005
|
getPlaneAltitudeSineCosinePolynomial(plane, result) {
|
|
188994
189006
|
if (!result)
|
|
188995
|
-
result = new
|
|
189007
|
+
result = new _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_13__.SineCosinePolynomial(0, 0, 0);
|
|
188996
189008
|
// altitude function of angle t, given plane with origin o and unit normal n:
|
|
188997
189009
|
// A(t) = (c + u cos(t) + v sin(t)) . n = (c-o).n + u.n cos(t) + v.n sin(t)
|
|
188998
189010
|
// Note the different functions for computing dot product against a point vs. a vector!
|
|
@@ -189145,7 +189157,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
189145
189157
|
numStroke = options.applyTolerancesToArc(rMax, this._sweep.sweepRadians);
|
|
189146
189158
|
}
|
|
189147
189159
|
else {
|
|
189148
|
-
numStroke =
|
|
189160
|
+
numStroke = _StrokeOptions__WEBPACK_IMPORTED_MODULE_16__.StrokeOptions.applyAngleTol(undefined, 1, this._sweep.sweepRadians);
|
|
189149
189161
|
}
|
|
189150
189162
|
return numStroke;
|
|
189151
189163
|
}
|
|
@@ -189284,7 +189296,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
189284
189296
|
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
|
|
189285
189297
|
*/
|
|
189286
189298
|
constructOffsetXY(offsetDistanceOrOptions) {
|
|
189287
|
-
const options =
|
|
189299
|
+
const options = _OffsetOptions__WEBPACK_IMPORTED_MODULE_17__.OffsetOptions.create(offsetDistanceOrOptions);
|
|
189288
189300
|
if (this.isCircular || options.preserveEllipticalArcs) {
|
|
189289
189301
|
const arcXY = this.cloneAtZ();
|
|
189290
189302
|
const sign = arcXY.sweep.sweepRadians * arcXY.matrixRef.coffs[8] >= 0.0 ? 1.0 : -1.0;
|
|
@@ -189306,7 +189318,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
189306
189318
|
}
|
|
189307
189319
|
}
|
|
189308
189320
|
// default impl
|
|
189309
|
-
const handler = new
|
|
189321
|
+
const handler = new _internalContexts_CurveOffsetXYHandler__WEBPACK_IMPORTED_MODULE_18__.CurveOffsetXYHandler(this, options.leftOffsetDistance);
|
|
189310
189322
|
this.emitStrokableParts(handler, options.strokeOptions);
|
|
189311
189323
|
return handler.claimResult();
|
|
189312
189324
|
}
|
|
@@ -189317,7 +189329,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
189317
189329
|
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the end of the ray.
|
|
189318
189330
|
*/
|
|
189319
189331
|
projectedParameterRange(ray, lowHigh) {
|
|
189320
|
-
return
|
|
189332
|
+
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_19__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
189321
189333
|
}
|
|
189322
189334
|
/**
|
|
189323
189335
|
* Construct a circular arc chain approximation to the instance elliptical arc.
|
|
@@ -189327,10 +189339,10 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
189327
189339
|
constructCircularArcChainApproximation(options) {
|
|
189328
189340
|
if (!options)
|
|
189329
189341
|
options = EllipticalArcApproximationOptions.create();
|
|
189330
|
-
const context =
|
|
189342
|
+
const context = _internalContexts_EllipticalArcApproximationContext__WEBPACK_IMPORTED_MODULE_20__.EllipticalArcApproximationContext.create(this);
|
|
189331
189343
|
const result = context.constructCircularArcChainApproximation(options);
|
|
189332
189344
|
if (!result && this.isCircular)
|
|
189333
|
-
return (this.sweep.isFullCircle && options.forcePath) ?
|
|
189345
|
+
return (this.sweep.isFullCircle && options.forcePath) ? _Path__WEBPACK_IMPORTED_MODULE_21__.Path.create(this) : this;
|
|
189334
189346
|
return result;
|
|
189335
189347
|
}
|
|
189336
189348
|
}
|
|
@@ -191112,7 +191124,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
191112
191124
|
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
191113
191125
|
/* harmony import */ var _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../geometry3d/Segment1d */ "../../core/geometry/lib/esm/geometry3d/Segment1d.js");
|
|
191114
191126
|
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
191115
|
-
/* harmony import */ var
|
|
191127
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
191116
191128
|
/* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
|
|
191117
191129
|
/* harmony import */ var _solid_Cone__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../solid/Cone */ "../../core/geometry/lib/esm/solid/Cone.js");
|
|
191118
191130
|
/* harmony import */ var _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../solid/RuledSweep */ "../../core/geometry/lib/esm/solid/RuledSweep.js");
|
|
@@ -191645,7 +191657,7 @@ class CurveFactory {
|
|
|
191645
191657
|
const vectorA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.createAdd2Scaled(unitAB, sA, unitPerpAB, tA);
|
|
191646
191658
|
const vectorB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.createAdd2Scaled(unitCB, sB, unitPerpCB, tB);
|
|
191647
191659
|
const uv = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_22__.Vector2d.create();
|
|
191648
|
-
if (
|
|
191660
|
+
if (_numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_23__.SmallSystem.linearSystem2d(unitAB.x, -unitCB.x, unitAB.y, -unitCB.y, vectorB.x - vectorA.x, vectorB.y - vectorA.y, uv)) {
|
|
191649
191661
|
const tangencyAB = pointB.plusScaled(unitAB, uv.x);
|
|
191650
191662
|
const tangencyCB = pointB.plusScaled(unitCB, uv.y);
|
|
191651
191663
|
const frameA = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_17__.Transform.createOriginAndMatrixColumns(tangencyAB, unitAB, unitPerpAB, _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.unitZ());
|
|
@@ -191681,7 +191693,7 @@ class CurveFactory {
|
|
|
191681
191693
|
const normalCx = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(normalAy, normalAz, normalBy, normalBz);
|
|
191682
191694
|
const normalCy = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(normalAz, normalAx, normalBz, normalBx);
|
|
191683
191695
|
const normalCz = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(normalAx, normalAy, normalBx, normalBy);
|
|
191684
|
-
const rayOrigin =
|
|
191696
|
+
const rayOrigin = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_23__.SmallSystem.linearSystem3d(normalAx, normalAy, normalAz, normalBx, normalBy, normalBz, normalCx, normalCy, normalCz, -altitudeA, -altitudeB, 0.0);
|
|
191685
191697
|
if (rayOrigin !== undefined) {
|
|
191686
191698
|
return _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_24__.Ray3d.createXYZUVW(rayOrigin.x, rayOrigin.y, rayOrigin.z, normalCx, normalCy, normalCz);
|
|
191687
191699
|
}
|
|
@@ -193339,7 +193351,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193339
193351
|
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
193340
193352
|
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
193341
193353
|
/* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
|
|
193342
|
-
/* harmony import */ var
|
|
193354
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
193343
193355
|
/* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
193344
193356
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
193345
193357
|
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
@@ -193571,7 +193583,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePr
|
|
|
193571
193583
|
const unboundedFractions = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_7__.Vector2d.create();
|
|
193572
193584
|
if (result === undefined)
|
|
193573
193585
|
result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetailPair.createCapture(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.create(), _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.create());
|
|
193574
|
-
if (
|
|
193586
|
+
if (_numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dClosestApproachUnbounded(segmentA._point0, segmentA._point1, segmentB._point0, segmentB._point1, unboundedFractions)) {
|
|
193575
193587
|
// There is a simple approach between the unbounded segments. Maybe its a really easy case ...
|
|
193576
193588
|
const fractionA = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__.CurveExtendOptions.correctFraction(extendA, unboundedFractions.x);
|
|
193577
193589
|
const fractionB = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__.CurveExtendOptions.correctFraction(extendB, unboundedFractions.y);
|
|
@@ -200497,17 +200509,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
200497
200509
|
/* harmony export */ "CurveCurveCloseApproachXY": () => (/* binding */ CurveCurveCloseApproachXY)
|
|
200498
200510
|
/* harmony export */ });
|
|
200499
200511
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
200500
|
-
/* harmony import */ var
|
|
200512
|
+
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
200501
200513
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
200502
200514
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
200503
200515
|
/* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
|
|
200504
|
-
/* harmony import */ var
|
|
200505
|
-
/* harmony import */ var
|
|
200516
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
200517
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
200506
200518
|
/* harmony import */ var _numerics_Newton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../numerics/Newton */ "../../core/geometry/lib/esm/numerics/Newton.js");
|
|
200507
|
-
/* harmony import */ var
|
|
200519
|
+
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
200520
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
200508
200521
|
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
200509
|
-
/* harmony import */ var
|
|
200510
|
-
/* harmony import */ var
|
|
200522
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
200523
|
+
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
200511
200524
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
200512
200525
|
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
200513
200526
|
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
@@ -200533,6 +200546,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
200533
200546
|
|
|
200534
200547
|
|
|
200535
200548
|
|
|
200549
|
+
|
|
200536
200550
|
// cspell:word XYRR currentdFdX
|
|
200537
200551
|
/**
|
|
200538
200552
|
* Handler class for XY close approach between _geometryB and another geometry.
|
|
@@ -200961,7 +200975,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
200961
200975
|
const arcPoint = arc.radiansToPoint(radians1);
|
|
200962
200976
|
const fArc = arc.sweep.radiansToSignedPeriodicFraction(radians1);
|
|
200963
200977
|
if (this.acceptFraction(fArc)) { // reject solution outside arc sweep
|
|
200964
|
-
const fLine =
|
|
200978
|
+
const fLine = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0, pointA1, arcPoint);
|
|
200965
200979
|
if (fLine !== undefined && this.acceptFraction(fLine))
|
|
200966
200980
|
this.recordPointWithLocalFractions(fLine, cpA, fractionA0, fractionA1, fArc, arc, 0, 1, reversed);
|
|
200967
200981
|
}
|
|
@@ -201002,12 +201016,12 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201002
201016
|
const cosines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
|
|
201003
201017
|
const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
|
|
201004
201018
|
const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
|
|
201005
|
-
const numRoots =
|
|
201019
|
+
const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(// solve the equation
|
|
201006
201020
|
alpha, beta, gamma, cosines, sines, radians);
|
|
201007
201021
|
for (let i = 0; i < numRoots; i++) {
|
|
201008
201022
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
201009
201023
|
const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
|
|
201010
|
-
const lineFraction =
|
|
201024
|
+
const lineFraction = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
201011
201025
|
// only add if the point is within the start and end fractions of both line segment and arc
|
|
201012
201026
|
if (lineFraction !== undefined && this.acceptFraction(lineFraction) && this.acceptFraction(arcFraction)) {
|
|
201013
201027
|
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
|
|
@@ -201129,7 +201143,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201129
201143
|
/** Low level dispatch of curve collection. */
|
|
201130
201144
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
201131
201145
|
const geomB = this._geometryB; // save
|
|
201132
|
-
if (!geomB || !geomB.children || !(geomB instanceof
|
|
201146
|
+
if (!geomB || !geomB.children || !(geomB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection))
|
|
201133
201147
|
return;
|
|
201134
201148
|
for (const child of geomB.children) {
|
|
201135
201149
|
this.resetGeometry(child);
|
|
@@ -201139,9 +201153,9 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201139
201153
|
}
|
|
201140
201154
|
/** Low level dispatch to geomA given a CurveChainWithDistanceIndex in geometryB. */
|
|
201141
201155
|
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
201142
|
-
if (!this._geometryB || !(this._geometryB instanceof
|
|
201156
|
+
if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex))
|
|
201143
201157
|
return;
|
|
201144
|
-
if (geomA instanceof
|
|
201158
|
+
if (geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex) {
|
|
201145
201159
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
201146
201160
|
return;
|
|
201147
201161
|
}
|
|
@@ -201152,7 +201166,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201152
201166
|
geomAHandler(geomA);
|
|
201153
201167
|
}
|
|
201154
201168
|
this.resetGeometry(geomB); // restore
|
|
201155
|
-
this._results =
|
|
201169
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
201156
201170
|
}
|
|
201157
201171
|
/** Double dispatch handler for strongly typed segment. */
|
|
201158
201172
|
handleLineSegment3d(segmentA) {
|
|
@@ -201166,13 +201180,13 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201166
201180
|
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_4__.Arc3d) {
|
|
201167
201181
|
this.dispatchSegmentArc(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._geometryB, false);
|
|
201168
201182
|
}
|
|
201169
|
-
else if (this._geometryB instanceof
|
|
201183
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_13__.BSplineCurve3d) {
|
|
201170
201184
|
this.dispatchSegmentBsplineCurve(segmentA, this._geometryB, false);
|
|
201171
201185
|
}
|
|
201172
|
-
else if (this._geometryB instanceof
|
|
201186
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
201173
201187
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
201174
201188
|
}
|
|
201175
|
-
else if (this._geometryB instanceof
|
|
201189
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex) {
|
|
201176
201190
|
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
201177
201191
|
}
|
|
201178
201192
|
return undefined;
|
|
@@ -201215,7 +201229,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201215
201229
|
return;
|
|
201216
201230
|
let bitB0;
|
|
201217
201231
|
let bitB1;
|
|
201218
|
-
const rangeA1 =
|
|
201232
|
+
const rangeA1 = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_14__.Range3d.createNull();
|
|
201219
201233
|
const pointA0 = CurveCurveCloseApproachXY._workPointAA0;
|
|
201220
201234
|
const pointA1 = CurveCurveCloseApproachXY._workPointAA1;
|
|
201221
201235
|
const pointB0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
@@ -201265,13 +201279,13 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201265
201279
|
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_4__.Arc3d) {
|
|
201266
201280
|
this.computeArcLineString(this._geometryB, lsA, true);
|
|
201267
201281
|
}
|
|
201268
|
-
else if (this._geometryB instanceof
|
|
201282
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_13__.BSplineCurve3d) {
|
|
201269
201283
|
this.dispatchLineStringBSplineCurve(lsA, this._geometryB, false);
|
|
201270
201284
|
}
|
|
201271
|
-
else if (this._geometryB instanceof
|
|
201285
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
201272
201286
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
201273
201287
|
}
|
|
201274
|
-
else if (this._geometryB instanceof
|
|
201288
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex) {
|
|
201275
201289
|
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
201276
201290
|
}
|
|
201277
201291
|
return undefined;
|
|
@@ -201287,13 +201301,13 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201287
201301
|
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_4__.Arc3d) {
|
|
201288
201302
|
this.dispatchArcArc(arc0, this._geometryB, false);
|
|
201289
201303
|
}
|
|
201290
|
-
else if (this._geometryB instanceof
|
|
201304
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_13__.BSplineCurve3d) {
|
|
201291
201305
|
this.dispatchArcBsplineCurve3d(arc0, this._geometryB, false);
|
|
201292
201306
|
}
|
|
201293
|
-
else if (this._geometryB instanceof
|
|
201307
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
201294
201308
|
this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
|
|
201295
201309
|
}
|
|
201296
|
-
else if (this._geometryB instanceof
|
|
201310
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex) {
|
|
201297
201311
|
this.dispatchCurveChainWithDistanceIndex(arc0, this.handleArc3d.bind(this));
|
|
201298
201312
|
}
|
|
201299
201313
|
return undefined;
|
|
@@ -201309,13 +201323,13 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201309
201323
|
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_4__.Arc3d) {
|
|
201310
201324
|
this.dispatchArcBsplineCurve3d(this._geometryB, curve, true);
|
|
201311
201325
|
}
|
|
201312
|
-
else if (this._geometryB instanceof
|
|
201326
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_13__.BSplineCurve3dBase) {
|
|
201313
201327
|
this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
|
|
201314
201328
|
}
|
|
201315
|
-
else if (this._geometryB instanceof
|
|
201329
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
201316
201330
|
this.dispatchCurveCollection(curve, this.handleBSplineCurve3d.bind(this));
|
|
201317
201331
|
}
|
|
201318
|
-
else if (this._geometryB instanceof
|
|
201332
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex) {
|
|
201319
201333
|
this.dispatchCurveChainWithDistanceIndex(curve, this.handleBSplineCurve3d.bind(this));
|
|
201320
201334
|
}
|
|
201321
201335
|
return undefined;
|
|
@@ -201324,7 +201338,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201324
201338
|
handleCurveChainWithDistanceIndex(chain) {
|
|
201325
201339
|
super.handleCurveChainWithDistanceIndex(chain);
|
|
201326
201340
|
// if _geometryB is also a CurveChainWithDistanceIndex, it will already have been converted by dispatchCurveChainWithDistanceIndex
|
|
201327
|
-
this._results =
|
|
201341
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, 0, chain, undefined, true);
|
|
201328
201342
|
}
|
|
201329
201343
|
/** Double dispatch handler for strongly typed homogeneous bspline curve .. */
|
|
201330
201344
|
handleBSplineCurve3dH(_curve) {
|
|
@@ -201344,11 +201358,11 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
201344
201358
|
return undefined;
|
|
201345
201359
|
}
|
|
201346
201360
|
}
|
|
201347
|
-
CurveCurveCloseApproachXY._workPointAA0 =
|
|
201348
|
-
CurveCurveCloseApproachXY._workPointAA1 =
|
|
201349
|
-
CurveCurveCloseApproachXY._workPointBB0 =
|
|
201350
|
-
CurveCurveCloseApproachXY._workPointBB1 =
|
|
201351
|
-
CurveCurveCloseApproachXY._workPointB =
|
|
201361
|
+
CurveCurveCloseApproachXY._workPointAA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_15__.Point3d.create();
|
|
201362
|
+
CurveCurveCloseApproachXY._workPointAA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_15__.Point3d.create();
|
|
201363
|
+
CurveCurveCloseApproachXY._workPointBB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_15__.Point3d.create();
|
|
201364
|
+
CurveCurveCloseApproachXY._workPointBB1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_15__.Point3d.create();
|
|
201365
|
+
CurveCurveCloseApproachXY._workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_15__.Point3d.create();
|
|
201352
201366
|
|
|
201353
201367
|
|
|
201354
201368
|
/***/ }),
|
|
@@ -201365,26 +201379,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
201365
201379
|
/* harmony export */ "CurveCurveIntersectXY": () => (/* binding */ CurveCurveIntersectXY)
|
|
201366
201380
|
/* harmony export */ });
|
|
201367
201381
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
201368
|
-
/* harmony import */ var
|
|
201382
|
+
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
201369
201383
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
201370
201384
|
/* harmony import */ var _geometry3d_CoincidentGeometryOps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geometry3d/CoincidentGeometryOps */ "../../core/geometry/lib/esm/geometry3d/CoincidentGeometryOps.js");
|
|
201371
201385
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
201372
201386
|
/* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
|
|
201373
|
-
/* harmony import */ var
|
|
201374
|
-
/* harmony import */ var
|
|
201375
|
-
/* harmony import */ var
|
|
201376
|
-
/* harmony import */ var
|
|
201377
|
-
/* harmony import */ var
|
|
201378
|
-
/* harmony import */ var
|
|
201379
|
-
/* harmony import */ var
|
|
201380
|
-
/* harmony import */ var
|
|
201381
|
-
/* harmony import */ var
|
|
201382
|
-
/* harmony import */ var
|
|
201387
|
+
/* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
|
|
201388
|
+
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
201389
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
201390
|
+
/* harmony import */ var _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../geometry4d/Point4d */ "../../core/geometry/lib/esm/geometry4d/Point4d.js");
|
|
201391
|
+
/* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
|
|
201392
|
+
/* harmony import */ var _numerics_Newton__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../numerics/Newton */ "../../core/geometry/lib/esm/numerics/Newton.js");
|
|
201393
|
+
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
201394
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
201395
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
201396
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
201397
|
+
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
201383
201398
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
201384
|
-
/* harmony import */ var
|
|
201385
|
-
/* harmony import */ var
|
|
201386
|
-
/* harmony import */ var
|
|
201387
|
-
/* harmony import */ var
|
|
201399
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
201400
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
201401
|
+
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
201402
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
201388
201403
|
/*---------------------------------------------------------------------------------------------
|
|
201389
201404
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
201390
201405
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -201411,6 +201426,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
201411
201426
|
|
|
201412
201427
|
|
|
201413
201428
|
|
|
201429
|
+
|
|
201414
201430
|
|
|
201415
201431
|
|
|
201416
201432
|
// cspell:word XYRR
|
|
@@ -201567,7 +201583,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201567
201583
|
this.recordPointWithLocalFractions(overlap.detailA.fraction, cpA, fractionA0, fractionA1, overlap.detailB.fraction, cpB, fractionB0, fractionB1, reversed, overlap);
|
|
201568
201584
|
}
|
|
201569
201585
|
}
|
|
201570
|
-
else if (
|
|
201586
|
+
else if (_numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dXYTransverseIntersectionUnbounded(pointA0, pointA1, pointB0, pointB1, uv)) {
|
|
201571
201587
|
if (this.acceptFractionOnLine(extendA0, uv.x, extendA1, pointA0, pointA1, this._coincidentGeometryContext.tolerance) &&
|
|
201572
201588
|
this.acceptFractionOnLine(extendB0, uv.y, extendB1, pointB0, pointB1, this._coincidentGeometryContext.tolerance)) {
|
|
201573
201589
|
this.recordPointWithLocalFractions(uv.x, cpA, fractionA0, fractionA1, uv.y, cpB, fractionB0, fractionB1, reversed);
|
|
@@ -201587,7 +201603,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201587
201603
|
this._worldToLocalPerspective.multiplyPoint3d(pointA1, 1, hA1);
|
|
201588
201604
|
this._worldToLocalPerspective.multiplyPoint3d(pointB0, 1, hB0);
|
|
201589
201605
|
this._worldToLocalPerspective.multiplyPoint3d(pointB1, 1, hB1);
|
|
201590
|
-
const fractionAB =
|
|
201606
|
+
const fractionAB = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dHXYTransverseIntersectionUnbounded(hA0, hA1, hB0, hB1);
|
|
201591
201607
|
if (fractionAB !== undefined) {
|
|
201592
201608
|
const fractionA = fractionAB.x;
|
|
201593
201609
|
const fractionB = fractionAB.y;
|
|
@@ -201636,11 +201652,11 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201636
201652
|
const cosines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__.GrowableFloat64Array(2);
|
|
201637
201653
|
const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__.GrowableFloat64Array(2);
|
|
201638
201654
|
const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__.GrowableFloat64Array(2);
|
|
201639
|
-
const numRoots =
|
|
201655
|
+
const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_7__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
201640
201656
|
for (let i = 0; i < numRoots; i++) {
|
|
201641
201657
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
201642
201658
|
const arcFraction = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(i), extendB0);
|
|
201643
|
-
const lineFraction =
|
|
201659
|
+
const lineFraction = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, arcPoint);
|
|
201644
201660
|
if (lineFraction !== undefined &&
|
|
201645
201661
|
this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
201646
201662
|
this.acceptFraction(extendB0, arcFraction, extendB1)) {
|
|
@@ -201662,13 +201678,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201662
201678
|
const cosines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__.GrowableFloat64Array(2);
|
|
201663
201679
|
const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__.GrowableFloat64Array(2);
|
|
201664
201680
|
const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__.GrowableFloat64Array(2);
|
|
201665
|
-
const numRoots =
|
|
201681
|
+
const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_7__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
201666
201682
|
const lineFractionTol = 1.0e-10; // TODO: why are we loosening tolerances here?
|
|
201667
201683
|
const arcFractionTol = 1.0e-7;
|
|
201668
201684
|
for (let i = 0; i < numRoots; i++) {
|
|
201669
201685
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
201670
201686
|
const arcFraction = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(i), extendB0);
|
|
201671
|
-
const lineFraction =
|
|
201687
|
+
const lineFraction = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
201672
201688
|
if (lineFraction !== undefined &&
|
|
201673
201689
|
this.acceptFraction(extendA0, lineFraction, extendA1, lineFractionTol) &&
|
|
201674
201690
|
this.acceptFraction(extendB0, arcFraction, extendB1, arcFractionTol)) {
|
|
@@ -201692,7 +201708,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201692
201708
|
const ellipseRadians = [];
|
|
201693
201709
|
const circleRadians = [];
|
|
201694
201710
|
// find the intersection of the transformed arcs
|
|
201695
|
-
|
|
201711
|
+
_numerics_Polynomials__WEBPACK_IMPORTED_MODULE_7__.TrigPolynomial.solveUnitCircleHomogeneousEllipseIntersection(localB.coffs[2], localB.coffs[5], localB.coffs[8], // center xyw
|
|
201696
201712
|
localB.coffs[0], localB.coffs[3], localB.coffs[6], // vector0 xyw
|
|
201697
201713
|
localB.coffs[1], localB.coffs[4], localB.coffs[7], // vector90 xyw
|
|
201698
201714
|
ellipseRadians, circleRadians);
|
|
@@ -201719,14 +201735,14 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201719
201735
|
if (this._worldToLocalPerspective) {
|
|
201720
201736
|
const dataA = cpA.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
201721
201737
|
const dataB = cpB.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
201722
|
-
matrixA =
|
|
201723
|
-
matrixB =
|
|
201738
|
+
matrixA = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createColumnsXYW(dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w);
|
|
201739
|
+
matrixB = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createColumnsXYW(dataB.vector0, dataB.vector0.w, dataB.vector90, dataA.vector90.w, dataB.center, dataB.center.w);
|
|
201724
201740
|
}
|
|
201725
201741
|
else {
|
|
201726
201742
|
const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);
|
|
201727
201743
|
const dataB = cpB.toTransformedVectors(this._worldToLocalAffine);
|
|
201728
|
-
matrixA =
|
|
201729
|
-
matrixB =
|
|
201744
|
+
matrixA = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);
|
|
201745
|
+
matrixB = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createColumnsXYW(dataB.vector0, 0, dataB.vector90, 0, dataB.center, 1);
|
|
201730
201746
|
}
|
|
201731
201747
|
const conditionA = matrixA.conditionNumber();
|
|
201732
201748
|
const conditionB = matrixB.conditionNumber();
|
|
@@ -201757,11 +201773,11 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201757
201773
|
let matrixA;
|
|
201758
201774
|
if (this._worldToLocalPerspective) {
|
|
201759
201775
|
const dataA = cpA.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
201760
|
-
matrixA =
|
|
201776
|
+
matrixA = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createColumnsXYW(dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w);
|
|
201761
201777
|
}
|
|
201762
201778
|
else {
|
|
201763
201779
|
const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);
|
|
201764
|
-
matrixA =
|
|
201780
|
+
matrixA = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);
|
|
201765
201781
|
}
|
|
201766
201782
|
// The worldToLocal has moved the arc vectors into local space.
|
|
201767
201783
|
// matrixA captures the xyw parts (ignoring z)
|
|
@@ -201772,7 +201788,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201772
201788
|
const orderF = cpB.order; // order of the beziers for simple coordinates
|
|
201773
201789
|
const orderG = 2 * orderF - 1; // order of the (single) bezier for squared coordinates.
|
|
201774
201790
|
const coffF = new Float64Array(orderF);
|
|
201775
|
-
const univariateBezierG = new
|
|
201791
|
+
const univariateBezierG = new _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_9__.UnivariateBezier(orderG);
|
|
201776
201792
|
const axx = matrixAInverse.at(0, 0);
|
|
201777
201793
|
const axy = matrixAInverse.at(0, 1);
|
|
201778
201794
|
const axz = 0.0;
|
|
@@ -201843,13 +201859,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201843
201859
|
dispatchBezierBezierStrokeFirst(bezierA, bcurveA, strokeCountA, bezierB, bcurveB, _strokeCountB, univariateBezierB, // caller-allocated for univariate coefficients.
|
|
201844
201860
|
reversed) {
|
|
201845
201861
|
if (!this._xyzwA0)
|
|
201846
|
-
this._xyzwA0 =
|
|
201862
|
+
this._xyzwA0 = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create();
|
|
201847
201863
|
if (!this._xyzwA1)
|
|
201848
|
-
this._xyzwA1 =
|
|
201864
|
+
this._xyzwA1 = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create();
|
|
201849
201865
|
if (!this._xyzwPlane)
|
|
201850
|
-
this._xyzwPlane =
|
|
201866
|
+
this._xyzwPlane = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create();
|
|
201851
201867
|
if (!this._xyzwB)
|
|
201852
|
-
this._xyzwB =
|
|
201868
|
+
this._xyzwB = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create();
|
|
201853
201869
|
/*
|
|
201854
201870
|
const roots = univariateBezierG.roots(0.0, true);
|
|
201855
201871
|
if (roots) {
|
|
@@ -201875,7 +201891,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201875
201891
|
for (let i = 1; i <= strokeCountA; i++, f0 = f1, this._xyzwA0.setFrom(this._xyzwA1)) {
|
|
201876
201892
|
f1 = i * df;
|
|
201877
201893
|
bezierA.fractionToPoint4d(f1, this._xyzwA1);
|
|
201878
|
-
|
|
201894
|
+
_geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);
|
|
201879
201895
|
bezierB.poleProductsXYZW(univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w);
|
|
201880
201896
|
let errors = 0;
|
|
201881
201897
|
const roots = univariateBezierB.roots(0.0, true);
|
|
@@ -201883,13 +201899,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201883
201899
|
for (const r of roots) {
|
|
201884
201900
|
let bezierBFraction = r;
|
|
201885
201901
|
bezierB.fractionToPoint4d(bezierBFraction, this._xyzwB);
|
|
201886
|
-
const segmentAFraction =
|
|
201902
|
+
const segmentAFraction = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(this._xyzwA0, this._xyzwA1, this._xyzwB);
|
|
201887
201903
|
if (segmentAFraction && _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isIn01WithTolerance(segmentAFraction, intervalTolerance)) {
|
|
201888
201904
|
let bezierAFraction = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(f0, segmentAFraction, f1);
|
|
201889
201905
|
// We have a near intersection at fractions on the two beziers
|
|
201890
201906
|
// Iterate on the curves for a true intersection
|
|
201891
|
-
const xyMatchingFunction = new
|
|
201892
|
-
const newtonSearcher = new
|
|
201907
|
+
const xyMatchingFunction = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_11__.CurveCurveIntersectionXYRRToRRD(bezierA, bezierB);
|
|
201908
|
+
const newtonSearcher = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_11__.Newton2dUnboundedWithDerivative(xyMatchingFunction);
|
|
201893
201909
|
newtonSearcher.setUV(bezierAFraction, bezierBFraction);
|
|
201894
201910
|
if (newtonSearcher.runIterations()) {
|
|
201895
201911
|
bezierAFraction = newtonSearcher.getU();
|
|
@@ -201917,8 +201933,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201917
201933
|
const rangeB = this.getRanges(bezierSpanB);
|
|
201918
201934
|
const orderA = bcurveA.order;
|
|
201919
201935
|
const orderB = bcurveB.order;
|
|
201920
|
-
const univariateCoffsA = new
|
|
201921
|
-
const univariateCoffsB = new
|
|
201936
|
+
const univariateCoffsA = new _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_9__.UnivariateBezier(orderA);
|
|
201937
|
+
const univariateCoffsB = new _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_9__.UnivariateBezier(orderB);
|
|
201922
201938
|
for (let a = 0; a < numA; a++) {
|
|
201923
201939
|
for (let b = 0; b < numB; b++) {
|
|
201924
201940
|
if (rangeA[a].intersectsRangeXY(rangeB[b])) {
|
|
@@ -201942,7 +201958,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201942
201958
|
return this._worldToLocalPerspective.multiplyPoint3d(xyz, w);
|
|
201943
201959
|
if (this._worldToLocalAffine)
|
|
201944
201960
|
return this._worldToLocalAffine.multiplyXYZW(xyz.x, xyz.y, xyz.z, w);
|
|
201945
|
-
return
|
|
201961
|
+
return _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.createFromPointAndWeight(xyz, w);
|
|
201946
201962
|
}
|
|
201947
201963
|
mapNPCPlaneToWorld(npcPlane, worldPlane) {
|
|
201948
201964
|
// for NPC pointY, Y^ * H = 0 is "on" plane H. (Hat is transpose)
|
|
@@ -201966,7 +201982,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201966
201982
|
dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve, extendB0, extendB1, reversed) {
|
|
201967
201983
|
const pointA0H = this.projectPoint(pointA0);
|
|
201968
201984
|
const pointA1H = this.projectPoint(pointA1);
|
|
201969
|
-
const planeCoffs =
|
|
201985
|
+
const planeCoffs = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.createPlanePointPointZ(pointA0H, pointA1H);
|
|
201970
201986
|
this.mapNPCPlaneToWorld(planeCoffs, planeCoffs);
|
|
201971
201987
|
// NOW .. we have a plane in world space. Intersect it with the bspline:
|
|
201972
201988
|
const intersections = [];
|
|
@@ -201978,7 +201994,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
201978
201994
|
const fractionB = detail.fraction;
|
|
201979
201995
|
const curvePoint = detail.point;
|
|
201980
201996
|
const curvePointH = this.projectPoint(curvePoint);
|
|
201981
|
-
const lineFraction =
|
|
201997
|
+
const lineFraction = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
|
|
201982
201998
|
if (lineFraction !== undefined) {
|
|
201983
201999
|
if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1)) {
|
|
201984
202000
|
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed);
|
|
@@ -202087,14 +202103,14 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
202087
202103
|
*/
|
|
202088
202104
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
202089
202105
|
const geomB = this._geometryB; // save
|
|
202090
|
-
if (!geomB || !geomB.children || !(geomB instanceof
|
|
202106
|
+
if (!geomB || !geomB.children || !(geomB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_12__.CurveCollection))
|
|
202091
202107
|
return;
|
|
202092
202108
|
const children = geomB.children;
|
|
202093
202109
|
const extendB0 = this._extendB0; // save
|
|
202094
202110
|
const extendB1 = this._extendB1; // save
|
|
202095
202111
|
for (let i = 0; i < children.length; i++) {
|
|
202096
202112
|
this.resetGeometry(children[i]);
|
|
202097
|
-
if (geomB instanceof
|
|
202113
|
+
if (geomB instanceof _Path__WEBPACK_IMPORTED_MODULE_13__.Path && children.length > 1) {
|
|
202098
202114
|
if (i === 0)
|
|
202099
202115
|
this._extendB1 = false; // first child can only extend from start
|
|
202100
202116
|
else if (i === children.length - 1)
|
|
@@ -202102,7 +202118,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
202102
202118
|
else
|
|
202103
202119
|
this._extendB0 = this._extendB1 = false; // middle children cannot extend
|
|
202104
202120
|
}
|
|
202105
|
-
else if (geomB instanceof
|
|
202121
|
+
else if (geomB instanceof _Loop__WEBPACK_IMPORTED_MODULE_14__.Loop) {
|
|
202106
202122
|
this._extendB0 = this._extendB1 = false; // Loops cannot extend
|
|
202107
202123
|
}
|
|
202108
202124
|
geomAHandler(geomA);
|
|
@@ -202116,9 +202132,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
202116
202132
|
* We take care of extend variables of geometry's children here if geometry.path is Path or Loop.
|
|
202117
202133
|
*/
|
|
202118
202134
|
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
202119
|
-
if (!this._geometryB || !(this._geometryB instanceof
|
|
202135
|
+
if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex))
|
|
202120
202136
|
return;
|
|
202121
|
-
if (geomA instanceof
|
|
202137
|
+
if (geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex) {
|
|
202122
202138
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
202123
202139
|
return;
|
|
202124
202140
|
}
|
|
@@ -202127,7 +202143,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
202127
202143
|
this.resetGeometry(geomB.path);
|
|
202128
202144
|
this.dispatchCurveCollection(geomA, geomAHandler);
|
|
202129
202145
|
this.resetGeometry(geomB); // restore
|
|
202130
|
-
this._results =
|
|
202146
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
202131
202147
|
}
|
|
202132
202148
|
/**
|
|
202133
202149
|
* Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children`.
|
|
@@ -202139,7 +202155,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
202139
202155
|
const extendA1 = this._extendA1; // save
|
|
202140
202156
|
if (children)
|
|
202141
202157
|
for (let i = 0; i < children.length; i++) {
|
|
202142
|
-
if (g instanceof
|
|
202158
|
+
if (g instanceof _Path__WEBPACK_IMPORTED_MODULE_13__.Path && children.length > 1) {
|
|
202143
202159
|
if (i === 0)
|
|
202144
202160
|
this._extendA1 = false; // first child can only extend from start
|
|
202145
202161
|
else if (i === children.length - 1)
|
|
@@ -202147,7 +202163,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
202147
202163
|
else
|
|
202148
202164
|
this._extendA0 = this._extendA1 = false; // middle children cannot extend
|
|
202149
202165
|
}
|
|
202150
|
-
else if (g instanceof
|
|
202166
|
+
else if (g instanceof _Loop__WEBPACK_IMPORTED_MODULE_14__.Loop) {
|
|
202151
202167
|
this._extendA0 = this._extendA1 = false; // Loops cannot extend
|
|
202152
202168
|
}
|
|
202153
202169
|
children[i].dispatchToGeometryHandler(this);
|
|
@@ -202157,90 +202173,90 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
202157
202173
|
}
|
|
202158
202174
|
/** Double dispatch handler for strongly typed segment. */
|
|
202159
202175
|
handleLineSegment3d(segmentA) {
|
|
202160
|
-
if (this._geometryB instanceof
|
|
202176
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__.LineSegment3d) {
|
|
202161
202177
|
const segmentB = this._geometryB;
|
|
202162
202178
|
this.dispatchSegmentSegment(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, segmentB, this._extendB0, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, this._extendB1, false);
|
|
202163
202179
|
}
|
|
202164
|
-
else if (this._geometryB instanceof
|
|
202180
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d) {
|
|
202165
202181
|
this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
202166
202182
|
}
|
|
202167
|
-
else if (this._geometryB instanceof
|
|
202183
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_18__.Arc3d) {
|
|
202168
202184
|
this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
202169
202185
|
}
|
|
202170
|
-
else if (this._geometryB instanceof
|
|
202186
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_19__.BSplineCurve3d) {
|
|
202171
202187
|
this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
202172
202188
|
}
|
|
202173
|
-
else if (this._geometryB instanceof
|
|
202189
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_12__.CurveCollection) {
|
|
202174
202190
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
202175
202191
|
}
|
|
202176
|
-
else if (this._geometryB instanceof
|
|
202192
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex) {
|
|
202177
202193
|
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
202178
202194
|
}
|
|
202179
202195
|
return undefined;
|
|
202180
202196
|
}
|
|
202181
202197
|
/** Double dispatch handler for strongly typed linestring. */
|
|
202182
202198
|
handleLineString3d(lsA) {
|
|
202183
|
-
if (this._geometryB instanceof
|
|
202199
|
+
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d) {
|
|
202184
202200
|
const lsB = this._geometryB;
|
|
202185
202201
|
this.computeLineStringLineString(lsA, lsB, false);
|
|
202186
202202
|
}
|
|
202187
|
-
else if (this._geometryB instanceof
|
|
202203
|
+
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__.LineSegment3d) {
|
|
202188
202204
|
this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
202189
202205
|
}
|
|
202190
|
-
else if (this._geometryB instanceof
|
|
202206
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_18__.Arc3d) {
|
|
202191
202207
|
this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
202192
202208
|
}
|
|
202193
|
-
else if (this._geometryB instanceof
|
|
202209
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_19__.BSplineCurve3d) {
|
|
202194
202210
|
this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
202195
202211
|
}
|
|
202196
|
-
else if (this._geometryB instanceof
|
|
202212
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_12__.CurveCollection) {
|
|
202197
202213
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
202198
202214
|
}
|
|
202199
|
-
else if (this._geometryB instanceof
|
|
202215
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex) {
|
|
202200
202216
|
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
202201
202217
|
}
|
|
202202
202218
|
return undefined;
|
|
202203
202219
|
}
|
|
202204
202220
|
/** Double dispatch handler for strongly typed arc. */
|
|
202205
202221
|
handleArc3d(arc0) {
|
|
202206
|
-
if (this._geometryB instanceof
|
|
202222
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__.LineSegment3d) {
|
|
202207
202223
|
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arc0, this._extendA0, this._extendA1, true);
|
|
202208
202224
|
}
|
|
202209
|
-
else if (this._geometryB instanceof
|
|
202225
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d) {
|
|
202210
202226
|
this.computeArcLineString(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
202211
202227
|
}
|
|
202212
|
-
else if (this._geometryB instanceof
|
|
202228
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_18__.Arc3d) {
|
|
202213
202229
|
this.dispatchArcArc(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
202214
202230
|
}
|
|
202215
|
-
else if (this._geometryB instanceof
|
|
202231
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_19__.BSplineCurve3d) {
|
|
202216
202232
|
this.dispatchArcBsplineCurve3d(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
202217
202233
|
}
|
|
202218
|
-
else if (this._geometryB instanceof
|
|
202234
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_12__.CurveCollection) {
|
|
202219
202235
|
this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
|
|
202220
202236
|
}
|
|
202221
|
-
else if (this._geometryB instanceof
|
|
202237
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex) {
|
|
202222
202238
|
this.dispatchCurveChainWithDistanceIndex(arc0, this.handleArc3d.bind(this));
|
|
202223
202239
|
}
|
|
202224
202240
|
return undefined;
|
|
202225
202241
|
}
|
|
202226
202242
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
202227
202243
|
handleBSplineCurve3d(curve) {
|
|
202228
|
-
if (this._geometryB instanceof
|
|
202244
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__.LineSegment3d) {
|
|
202229
202245
|
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
202230
202246
|
}
|
|
202231
|
-
else if (this._geometryB instanceof
|
|
202247
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d) {
|
|
202232
202248
|
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
202233
202249
|
}
|
|
202234
|
-
else if (this._geometryB instanceof
|
|
202250
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_18__.Arc3d) {
|
|
202235
202251
|
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
202236
202252
|
}
|
|
202237
|
-
else if (this._geometryB instanceof
|
|
202253
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_19__.BSplineCurve3dBase) {
|
|
202238
202254
|
this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
|
|
202239
202255
|
}
|
|
202240
|
-
else if (this._geometryB instanceof
|
|
202256
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_12__.CurveCollection) {
|
|
202241
202257
|
this.dispatchCurveCollection(curve, this.handleBSplineCurve3d.bind(this));
|
|
202242
202258
|
}
|
|
202243
|
-
else if (this._geometryB instanceof
|
|
202259
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex) {
|
|
202244
202260
|
this.dispatchCurveChainWithDistanceIndex(curve, this.handleBSplineCurve3d.bind(this));
|
|
202245
202261
|
}
|
|
202246
202262
|
return undefined;
|
|
@@ -202249,7 +202265,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
202249
202265
|
handleCurveChainWithDistanceIndex(chain) {
|
|
202250
202266
|
super.handleCurveChainWithDistanceIndex(chain);
|
|
202251
202267
|
// if _geometryB is also a CurveChainWithDistanceIndex, it will already have been converted by dispatchCurveChainWithDistanceIndex
|
|
202252
|
-
this._results =
|
|
202268
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, 0, chain, undefined, true);
|
|
202253
202269
|
}
|
|
202254
202270
|
/** Double dispatch handler for strongly typed homogeneous bspline curve. */
|
|
202255
202271
|
handleBSplineCurve3dH(_curve) {
|
|
@@ -202269,19 +202285,19 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
202269
202285
|
return undefined;
|
|
202270
202286
|
}
|
|
202271
202287
|
}
|
|
202272
|
-
CurveCurveIntersectXY._workVector2dA =
|
|
202273
|
-
CurveCurveIntersectXY._workPointA0H =
|
|
202274
|
-
CurveCurveIntersectXY._workPointA1H =
|
|
202275
|
-
CurveCurveIntersectXY._workPointB0H =
|
|
202276
|
-
CurveCurveIntersectXY._workPointB1H =
|
|
202277
|
-
CurveCurveIntersectXY._workPointAA0 =
|
|
202278
|
-
CurveCurveIntersectXY._workPointAA1 =
|
|
202279
|
-
CurveCurveIntersectXY._workPointBB0 =
|
|
202280
|
-
CurveCurveIntersectXY._workPointBB1 =
|
|
202281
|
-
CurveCurveIntersectXY._workPointA0 =
|
|
202282
|
-
CurveCurveIntersectXY._workPointA1 =
|
|
202283
|
-
CurveCurveIntersectXY._workPointB0 =
|
|
202284
|
-
CurveCurveIntersectXY._workPointB1 =
|
|
202288
|
+
CurveCurveIntersectXY._workVector2dA = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_20__.Vector2d.create();
|
|
202289
|
+
CurveCurveIntersectXY._workPointA0H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create();
|
|
202290
|
+
CurveCurveIntersectXY._workPointA1H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create();
|
|
202291
|
+
CurveCurveIntersectXY._workPointB0H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create();
|
|
202292
|
+
CurveCurveIntersectXY._workPointB1H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create();
|
|
202293
|
+
CurveCurveIntersectXY._workPointAA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_21__.Point3d.create();
|
|
202294
|
+
CurveCurveIntersectXY._workPointAA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_21__.Point3d.create();
|
|
202295
|
+
CurveCurveIntersectXY._workPointBB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_21__.Point3d.create();
|
|
202296
|
+
CurveCurveIntersectXY._workPointBB1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_21__.Point3d.create();
|
|
202297
|
+
CurveCurveIntersectXY._workPointA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_21__.Point3d.create();
|
|
202298
|
+
CurveCurveIntersectXY._workPointA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_21__.Point3d.create();
|
|
202299
|
+
CurveCurveIntersectXY._workPointB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_21__.Point3d.create();
|
|
202300
|
+
CurveCurveIntersectXY._workPointB1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_21__.Point3d.create();
|
|
202285
202301
|
|
|
202286
202302
|
|
|
202287
202303
|
/***/ }),
|
|
@@ -202298,21 +202314,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
202298
202314
|
/* harmony export */ "CurveCurveIntersectXYZ": () => (/* binding */ CurveCurveIntersectXYZ)
|
|
202299
202315
|
/* harmony export */ });
|
|
202300
202316
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
202301
|
-
/* harmony import */ var
|
|
202317
|
+
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
202302
202318
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
202303
202319
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
202304
202320
|
/* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
|
|
202305
|
-
/* harmony import */ var
|
|
202321
|
+
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
202306
202322
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
202307
|
-
/* harmony import */ var
|
|
202308
|
-
/* harmony import */ var
|
|
202309
|
-
/* harmony import */ var
|
|
202310
|
-
/* harmony import */ var
|
|
202323
|
+
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
202324
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
202325
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
202326
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
202327
|
+
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
202311
202328
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
202312
|
-
/* harmony import */ var
|
|
202313
|
-
/* harmony import */ var
|
|
202314
|
-
/* harmony import */ var
|
|
202315
|
-
/* harmony import */ var
|
|
202329
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
202330
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
202331
|
+
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
202332
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
202316
202333
|
/*---------------------------------------------------------------------------------------------
|
|
202317
202334
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
202318
202335
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -202336,6 +202353,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
202336
202353
|
|
|
202337
202354
|
|
|
202338
202355
|
|
|
202356
|
+
|
|
202339
202357
|
// cspell:word XYRR
|
|
202340
202358
|
/**
|
|
202341
202359
|
* Handler class for XYZ intersections between _geometryB and another geometry.
|
|
@@ -202430,7 +202448,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
202430
202448
|
*/
|
|
202431
202449
|
computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
202432
202450
|
const uv = CurveCurveIntersectXYZ._workVector2dA;
|
|
202433
|
-
if (
|
|
202451
|
+
if (_numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_4__.SmallSystem.lineSegment3dClosestApproachUnbounded(pointA0, pointA1, pointB0, pointB1, uv) &&
|
|
202434
202452
|
this.acceptFraction(extendA0, uv.x, extendA1) && this.acceptFraction(extendB0, uv.y, extendB1)) {
|
|
202435
202453
|
this.recordPointWithLocalFractions(uv.x, cpA, fractionA0, fractionA1, uv.y, cpB, fractionB0, fractionB1, reversed);
|
|
202436
202454
|
}
|
|
@@ -202481,7 +202499,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
202481
202499
|
for (const c of candidates) {
|
|
202482
202500
|
const arcFraction = arc.sweep.fractionToSignedPeriodicFraction(c.fraction, extendB0);
|
|
202483
202501
|
if (this.acceptFraction(extendB0, arcFraction, extendB1)) {
|
|
202484
|
-
lineFraction =
|
|
202502
|
+
lineFraction = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_4__.SmallSystem.lineSegment3dClosestPointUnbounded(pointA0, pointA1, c.point);
|
|
202485
202503
|
if (lineFraction !== undefined) {
|
|
202486
202504
|
linePoint = pointA0.interpolate(lineFraction, pointA1, linePoint);
|
|
202487
202505
|
if (linePoint.isAlmostEqualMetric(c.point) && this.acceptFraction(extendA0, lineFraction, extendA1)) {
|
|
@@ -202501,7 +202519,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
202501
202519
|
if (otherVectors !== undefined) {
|
|
202502
202520
|
const ellipseRadians = [];
|
|
202503
202521
|
const circleRadians = [];
|
|
202504
|
-
|
|
202522
|
+
_numerics_Polynomials__WEBPACK_IMPORTED_MODULE_7__.TrigPolynomial.solveUnitCircleHomogeneousEllipseIntersection(otherVectors.center.x, otherVectors.center.y, 1.0, otherVectors.vector0.x, otherVectors.vector0.y, 0.0, otherVectors.vector90.x, otherVectors.vector90.y, 0.0, ellipseRadians, circleRadians);
|
|
202505
202523
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
202506
202524
|
const fractionA = cpA.sweep.radiansToSignedFraction(circleRadians[i], extendA0);
|
|
202507
202525
|
const fractionB = cpB.sweep.radiansToSignedFraction(ellipseRadians[i], extendB0);
|
|
@@ -202932,14 +202950,14 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
202932
202950
|
*/
|
|
202933
202951
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
202934
202952
|
const geomB = this._geometryB; // save
|
|
202935
|
-
if (!geomB || !geomB.children || !(geomB instanceof
|
|
202953
|
+
if (!geomB || !geomB.children || !(geomB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_8__.CurveCollection))
|
|
202936
202954
|
return;
|
|
202937
202955
|
const children = geomB.children;
|
|
202938
202956
|
const extendB0 = this._extendB0; // save
|
|
202939
202957
|
const extendB1 = this._extendB1; // save
|
|
202940
202958
|
for (let i = 0; i < children.length; i++) {
|
|
202941
202959
|
this.resetGeometry(children[i]);
|
|
202942
|
-
if (geomB instanceof
|
|
202960
|
+
if (geomB instanceof _Path__WEBPACK_IMPORTED_MODULE_9__.Path && children.length > 1) {
|
|
202943
202961
|
if (i === 0)
|
|
202944
202962
|
this._extendB1 = false; // first child can only extend from start
|
|
202945
202963
|
else if (i === children.length - 1)
|
|
@@ -202947,7 +202965,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
202947
202965
|
else
|
|
202948
202966
|
this._extendB0 = this._extendB1 = false; // middle children cannot extend
|
|
202949
202967
|
}
|
|
202950
|
-
else if (geomB instanceof
|
|
202968
|
+
else if (geomB instanceof _Loop__WEBPACK_IMPORTED_MODULE_10__.Loop) {
|
|
202951
202969
|
this._extendB0 = this._extendB1 = false; // Loops cannot extend
|
|
202952
202970
|
}
|
|
202953
202971
|
geomAHandler(geomA);
|
|
@@ -202961,9 +202979,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
202961
202979
|
* We take care of extend variables of geometry's children here if geometry.path is Path or Loop.
|
|
202962
202980
|
*/
|
|
202963
202981
|
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
202964
|
-
if (!this._geometryB || !(this._geometryB instanceof
|
|
202982
|
+
if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex))
|
|
202965
202983
|
return;
|
|
202966
|
-
if (geomA instanceof
|
|
202984
|
+
if (geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex) {
|
|
202967
202985
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
202968
202986
|
return;
|
|
202969
202987
|
}
|
|
@@ -202972,7 +202990,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
202972
202990
|
this.resetGeometry(geomB.path);
|
|
202973
202991
|
this.dispatchCurveCollection(geomA, geomAHandler);
|
|
202974
202992
|
this.resetGeometry(geomB); // restore
|
|
202975
|
-
this._results =
|
|
202993
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
202976
202994
|
}
|
|
202977
202995
|
/**
|
|
202978
202996
|
* Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children`.
|
|
@@ -202984,7 +203002,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
202984
203002
|
const extendA1 = this._extendA1; // save
|
|
202985
203003
|
if (children)
|
|
202986
203004
|
for (let i = 0; i < children.length; i++) {
|
|
202987
|
-
if (g instanceof
|
|
203005
|
+
if (g instanceof _Path__WEBPACK_IMPORTED_MODULE_9__.Path && children.length > 1) {
|
|
202988
203006
|
if (i === 0)
|
|
202989
203007
|
this._extendA1 = false; // first child can only extend from start
|
|
202990
203008
|
else if (i === children.length - 1)
|
|
@@ -202992,7 +203010,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
202992
203010
|
else
|
|
202993
203011
|
this._extendA0 = this._extendA1 = false; // middle children cannot extend
|
|
202994
203012
|
}
|
|
202995
|
-
else if (g instanceof
|
|
203013
|
+
else if (g instanceof _Loop__WEBPACK_IMPORTED_MODULE_10__.Loop) {
|
|
202996
203014
|
this._extendA0 = this._extendA1 = false; // Loops cannot extend
|
|
202997
203015
|
}
|
|
202998
203016
|
children[i].dispatchToGeometryHandler(this);
|
|
@@ -203002,90 +203020,90 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
203002
203020
|
}
|
|
203003
203021
|
/** Double dispatch handler for strongly typed segment. */
|
|
203004
203022
|
handleLineSegment3d(segmentA) {
|
|
203005
|
-
if (this._geometryB instanceof
|
|
203023
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
|
|
203006
203024
|
const segmentB = this._geometryB;
|
|
203007
203025
|
this.dispatchSegmentSegment(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, segmentB, this._extendB0, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, this._extendB1, false);
|
|
203008
203026
|
}
|
|
203009
|
-
else if (this._geometryB instanceof
|
|
203027
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_13__.LineString3d) {
|
|
203010
203028
|
this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
203011
203029
|
}
|
|
203012
|
-
else if (this._geometryB instanceof
|
|
203030
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_14__.Arc3d) {
|
|
203013
203031
|
this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
203014
203032
|
}
|
|
203015
|
-
else if (this._geometryB instanceof
|
|
203033
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_15__.BSplineCurve3d) {
|
|
203016
203034
|
this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
203017
203035
|
}
|
|
203018
|
-
else if (this._geometryB instanceof
|
|
203036
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_8__.CurveCollection) {
|
|
203019
203037
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
203020
203038
|
}
|
|
203021
|
-
else if (this._geometryB instanceof
|
|
203039
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex) {
|
|
203022
203040
|
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
203023
203041
|
}
|
|
203024
203042
|
return undefined;
|
|
203025
203043
|
}
|
|
203026
203044
|
/** double dispatch handler for strongly typed linestring. */
|
|
203027
203045
|
handleLineString3d(lsA) {
|
|
203028
|
-
if (this._geometryB instanceof
|
|
203046
|
+
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_13__.LineString3d) {
|
|
203029
203047
|
const lsB = this._geometryB;
|
|
203030
203048
|
this.computeLineStringLineString(lsA, lsB, false);
|
|
203031
203049
|
}
|
|
203032
|
-
else if (this._geometryB instanceof
|
|
203050
|
+
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
|
|
203033
203051
|
this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
203034
203052
|
}
|
|
203035
|
-
else if (this._geometryB instanceof
|
|
203053
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_14__.Arc3d) {
|
|
203036
203054
|
this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
203037
203055
|
}
|
|
203038
|
-
else if (this._geometryB instanceof
|
|
203056
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_15__.BSplineCurve3d) {
|
|
203039
203057
|
this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
203040
203058
|
}
|
|
203041
|
-
else if (this._geometryB instanceof
|
|
203059
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_8__.CurveCollection) {
|
|
203042
203060
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
203043
203061
|
}
|
|
203044
|
-
else if (this._geometryB instanceof
|
|
203062
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex) {
|
|
203045
203063
|
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
203046
203064
|
}
|
|
203047
203065
|
return undefined;
|
|
203048
203066
|
}
|
|
203049
203067
|
/** Double dispatch handler for strongly typed arc. */
|
|
203050
203068
|
handleArc3d(arc0) {
|
|
203051
|
-
if (this._geometryB instanceof
|
|
203069
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
|
|
203052
203070
|
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arc0, this._extendA0, this._extendA1, true);
|
|
203053
203071
|
}
|
|
203054
|
-
else if (this._geometryB instanceof
|
|
203072
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_13__.LineString3d) {
|
|
203055
203073
|
this.computeArcLineString(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
203056
203074
|
}
|
|
203057
|
-
else if (this._geometryB instanceof
|
|
203075
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_14__.Arc3d) {
|
|
203058
203076
|
this.dispatchArcArc(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
203059
203077
|
}
|
|
203060
|
-
else if (this._geometryB instanceof
|
|
203078
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_15__.BSplineCurve3d) {
|
|
203061
203079
|
this.dispatchArcBsplineCurve3d(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
203062
203080
|
}
|
|
203063
|
-
else if (this._geometryB instanceof
|
|
203081
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_8__.CurveCollection) {
|
|
203064
203082
|
this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
|
|
203065
203083
|
}
|
|
203066
|
-
else if (this._geometryB instanceof
|
|
203084
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex) {
|
|
203067
203085
|
this.dispatchCurveChainWithDistanceIndex(arc0, this.handleArc3d.bind(this));
|
|
203068
203086
|
}
|
|
203069
203087
|
return undefined;
|
|
203070
203088
|
}
|
|
203071
203089
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
203072
203090
|
handleBSplineCurve3d(curve) {
|
|
203073
|
-
if (this._geometryB instanceof
|
|
203091
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
|
|
203074
203092
|
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
203075
203093
|
}
|
|
203076
|
-
else if (this._geometryB instanceof
|
|
203094
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_13__.LineString3d) {
|
|
203077
203095
|
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
203078
203096
|
}
|
|
203079
|
-
else if (this._geometryB instanceof
|
|
203097
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_14__.Arc3d) {
|
|
203080
203098
|
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
203081
203099
|
}
|
|
203082
|
-
else if (this._geometryB instanceof
|
|
203100
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_15__.BSplineCurve3dBase) {
|
|
203083
203101
|
this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
|
|
203084
203102
|
}
|
|
203085
|
-
else if (this._geometryB instanceof
|
|
203103
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_8__.CurveCollection) {
|
|
203086
203104
|
this.dispatchCurveCollection(curve, this.handleBSplineCurve3d.bind(this));
|
|
203087
203105
|
}
|
|
203088
|
-
else if (this._geometryB instanceof
|
|
203106
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex) {
|
|
203089
203107
|
this.dispatchCurveChainWithDistanceIndex(curve, this.handleBSplineCurve3d.bind(this));
|
|
203090
203108
|
}
|
|
203091
203109
|
return undefined;
|
|
@@ -203094,7 +203112,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
203094
203112
|
handleCurveChainWithDistanceIndex(chain) {
|
|
203095
203113
|
super.handleCurveChainWithDistanceIndex(chain);
|
|
203096
203114
|
// if _geometryB is also a CurveChainWithDistanceIndex, it will already have been converted by dispatchCurveChainWithDistanceIndex
|
|
203097
|
-
this._results =
|
|
203115
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, 0, chain, undefined, true);
|
|
203098
203116
|
}
|
|
203099
203117
|
/** Double dispatch handler for strongly typed homogeneous bspline curve. */
|
|
203100
203118
|
handleBSplineCurve3dH(_curve) {
|
|
@@ -203119,7 +203137,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
203119
203137
|
return undefined;
|
|
203120
203138
|
}
|
|
203121
203139
|
}
|
|
203122
|
-
CurveCurveIntersectXYZ._workVector2dA =
|
|
203140
|
+
CurveCurveIntersectXYZ._workVector2dA = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_16__.Vector2d.create();
|
|
203123
203141
|
CurveCurveIntersectXYZ._workPointAA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create();
|
|
203124
203142
|
CurveCurveIntersectXYZ._workPointAA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create();
|
|
203125
203143
|
CurveCurveIntersectXYZ._workPointBB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create();
|
|
@@ -210018,7 +210036,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
210018
210036
|
/* harmony import */ var _bspline_SurfaceLocationDetail__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../bspline/SurfaceLocationDetail */ "../../core/geometry/lib/esm/bspline/SurfaceLocationDetail.js");
|
|
210019
210037
|
/* harmony import */ var _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../curve/CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
210020
210038
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
210021
|
-
/* harmony import */ var
|
|
210039
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
210022
210040
|
/* harmony import */ var _Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
|
|
210023
210041
|
/* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
210024
210042
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -210193,9 +210211,9 @@ class BilinearPatch {
|
|
|
210193
210211
|
// swap rows so that the equation with largest ray.direction coefficient is first.
|
|
210194
210212
|
BilinearPatch.conditionalPivot(0, coffs, 0, 1);
|
|
210195
210213
|
BilinearPatch.conditionalPivot(0, coffs, 0, 2);
|
|
210196
|
-
|
|
210197
|
-
|
|
210198
|
-
const uvArray =
|
|
210214
|
+
_numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_2__.SmallSystem.eliminateFromPivot(coffs[0], 0, coffs[1], -1.0);
|
|
210215
|
+
_numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_2__.SmallSystem.eliminateFromPivot(coffs[0], 0, coffs[2], -1.0);
|
|
210216
|
+
const uvArray = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_2__.SmallSystem.solveBilinearPair(coffs[1][1], coffs[1][2], coffs[1][3], coffs[1][4], coffs[2][1], coffs[2][2], coffs[2][3], coffs[2][4]);
|
|
210199
210217
|
if (uvArray) {
|
|
210200
210218
|
const result = [];
|
|
210201
210219
|
for (const uv of uvArray) {
|
|
@@ -217696,8 +217714,8 @@ class Matrix3d {
|
|
|
217696
217714
|
return Math.sqrt(sumLow) <= _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallAngleRadians * (1.0 + Math.sqrt(sumAll));
|
|
217697
217715
|
}
|
|
217698
217716
|
/**
|
|
217699
|
-
* If the matrix is diagonal
|
|
217700
|
-
*
|
|
217717
|
+
* If the matrix is diagonal with almost equal diagonal entries, return the first diagonal entry.
|
|
217718
|
+
* Otherwise return `undefined`.
|
|
217701
217719
|
*/
|
|
217702
217720
|
sameDiagonalScale() {
|
|
217703
217721
|
const sumAll = this.sumSquares();
|
|
@@ -217710,32 +217728,31 @@ class Matrix3d {
|
|
|
217710
217728
|
return undefined;
|
|
217711
217729
|
}
|
|
217712
217730
|
/**
|
|
217713
|
-
* Test if all rows and columns are unit length and
|
|
217714
|
-
* a
|
|
217715
|
-
* *
|
|
217731
|
+
* Test if all rows and columns are unit length and perpendicular to each other.
|
|
217732
|
+
* * If so, the matrix is either a rotation (determinant is +1) or a mirror (determinant is -1).
|
|
217733
|
+
* * Such a matrix is called "orthogonal" and its inverse is its transpose.
|
|
217716
217734
|
*/
|
|
217717
217735
|
testPerpendicularUnitRowsAndColumns() {
|
|
217718
217736
|
const product = this.multiplyMatrixMatrixTranspose(this);
|
|
217719
217737
|
return product.isIdentity;
|
|
217720
217738
|
}
|
|
217721
217739
|
/**
|
|
217722
|
-
* Test if the matrix is a
|
|
217723
|
-
* pairwise perpendicular and
|
|
217724
|
-
*
|
|
217740
|
+
* Test if the matrix is a rigid matrix.
|
|
217741
|
+
* * A rigid matrix is a rotation: its columns and rows are unit length and pairwise perpendicular, and its
|
|
217742
|
+
* determinant is +1.
|
|
217743
|
+
* @param allowMirror whether to widen the test to also return true if the matrix is a mirror (determinant is -1).
|
|
217725
217744
|
*/
|
|
217726
217745
|
isRigid(allowMirror = false) {
|
|
217727
217746
|
return this.testPerpendicularUnitRowsAndColumns() && (allowMirror || this.determinant() > 0);
|
|
217728
217747
|
}
|
|
217729
217748
|
/**
|
|
217730
|
-
* Test if
|
|
217731
|
-
*
|
|
217732
|
-
* the
|
|
217749
|
+
* Test if the instance is the product of a rigid matrix and a signed scale, and return both.
|
|
217750
|
+
* * Specifically, this is a test of whether the instance rows and columns are pairwise perpendicular and have equal
|
|
217751
|
+
* length. If so, the scale factor is this length, or its negative if the instance is a mirror, and dividing the
|
|
217752
|
+
* columns by this scale factor produces a rigid matrix (a rotation).
|
|
217733
217753
|
* @param result optional pre-allocated object to populate and return
|
|
217734
|
-
* @returns
|
|
217735
|
-
*
|
|
217736
|
-
* * Note that determinant of a rigid matrix is +1.
|
|
217737
|
-
* * The context for this method is to determine if the matrix is the product a `rotation` matrix and a uniform
|
|
217738
|
-
* `scale` matrix (diagonal matrix with all diagonal entries the same nonzero number).
|
|
217754
|
+
* @returns the factorization `{ rigidAxes, scale }` where `rigidAxes` is the instance matrix with `scale` factor
|
|
217755
|
+
* removed, or undefined if the factorization failed.
|
|
217739
217756
|
*/
|
|
217740
217757
|
factorRigidWithSignedScale(result) {
|
|
217741
217758
|
const product = this.multiplyMatrixMatrixTranspose(this);
|
|
@@ -217746,6 +217763,25 @@ class Matrix3d {
|
|
|
217746
217763
|
const scaleInverse = 1.0 / scale;
|
|
217747
217764
|
return { rigidAxes: this.scaleColumns(scaleInverse, scaleInverse, scaleInverse, result), scale };
|
|
217748
217765
|
}
|
|
217766
|
+
/**
|
|
217767
|
+
* Compute the factorization M = R*G, where R is rigid (a rotation) and G is whatever is left over (skew, scale,
|
|
217768
|
+
* mirror, etc).
|
|
217769
|
+
* * The rotation is computed from the instance by passing `axisOrder` into [[createRigidFromMatrix3d]].
|
|
217770
|
+
* @param rotation the rigid factor R
|
|
217771
|
+
* @param skew the non-rotation factor G = R^t * M (since R transposed is its inverse)
|
|
217772
|
+
* @param axisOrder optional cross product ordering for computing R
|
|
217773
|
+
* @return whether [[createRigidFromMatrix3d]] succeeded; if not, `rotation` is set to the identity, and `skew` is
|
|
217774
|
+
* set to this instance.
|
|
217775
|
+
*/
|
|
217776
|
+
factorRigidSkew(rotation, skew, axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.XYZ) {
|
|
217777
|
+
if (Matrix3d.createRigidFromMatrix3d(this, axisOrder, rotation)) {
|
|
217778
|
+
rotation.multiplyMatrixTransposeMatrix(this, skew);
|
|
217779
|
+
return true;
|
|
217780
|
+
}
|
|
217781
|
+
rotation.setIdentity();
|
|
217782
|
+
skew.setFrom(this);
|
|
217783
|
+
return false;
|
|
217784
|
+
}
|
|
217749
217785
|
/** Test if `this` matrix reorders and/or negates the columns of the `identity` matrix. */
|
|
217750
217786
|
get isSignedPermutation() {
|
|
217751
217787
|
let count = 0;
|
|
@@ -227158,7 +227194,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
227158
227194
|
/* harmony export */ });
|
|
227159
227195
|
/* harmony import */ var _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
227160
227196
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
227161
|
-
/* harmony import */ var
|
|
227197
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
227162
227198
|
/* harmony import */ var _Matrix3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
|
|
227163
227199
|
/* harmony import */ var _Point2dVector2d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
227164
227200
|
/* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
@@ -227630,7 +227666,7 @@ class Ray3d {
|
|
|
227630
227666
|
let fractionA, fractionB;
|
|
227631
227667
|
let pointA, pointB;
|
|
227632
227668
|
let pairType;
|
|
227633
|
-
if (
|
|
227669
|
+
if (_numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.ray3dXYZUVWClosestApproachUnbounded(rayA.origin.x, rayA.origin.y, rayA.origin.z, rayA.direction.x, rayA.direction.y, rayA.direction.z, rayB.origin.x, rayB.origin.y, rayB.origin.z, rayB.direction.x, rayB.direction.y, rayB.direction.z, intersectionFractions)) {
|
|
227634
227670
|
fractionA = intersectionFractions.x;
|
|
227635
227671
|
fractionB = intersectionFractions.y;
|
|
227636
227672
|
pointA = rayA.fractionToPoint(fractionA);
|
|
@@ -231368,7 +231404,8 @@ class Point4d extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d {
|
|
|
231368
231404
|
projectPointToPlane(spacePoint, result) {
|
|
231369
231405
|
const h = this.altitude(spacePoint);
|
|
231370
231406
|
const nn = this.magnitudeSquaredXYZ();
|
|
231371
|
-
|
|
231407
|
+
// this unusual tol is needed so that toPlane3dByOriginAndUnitNormal agrees with its original implementation
|
|
231408
|
+
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideCoordinate(-h, nn, _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.largeFractionResult * _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.largeFractionResult);
|
|
231372
231409
|
if (alpha === undefined)
|
|
231373
231410
|
return spacePoint.clone(result);
|
|
231374
231411
|
return spacePoint.plusXYZ(alpha * this.x, alpha * this.y, alpha * this.z, result);
|
|
@@ -233954,14 +233991,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
233954
233991
|
/* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
|
|
233955
233992
|
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
233956
233993
|
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
233957
|
-
/* harmony import */ var
|
|
233994
|
+
/* harmony import */ var _SmallSystem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
233958
233995
|
/*---------------------------------------------------------------------------------------------
|
|
233959
233996
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
233960
233997
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
233961
233998
|
*--------------------------------------------------------------------------------------------*/
|
|
233962
|
-
/** @packageDocumentation
|
|
233963
|
-
* @module Numerics
|
|
233964
|
-
*/
|
|
233965
233999
|
|
|
233966
234000
|
|
|
233967
234001
|
|
|
@@ -234210,7 +234244,7 @@ class Newton2dUnboundedWithDerivative extends AbstractNewtonIterator {
|
|
|
234210
234244
|
const jCol1 = fA.vectorV;
|
|
234211
234245
|
const fX = fA.origin;
|
|
234212
234246
|
// Given X_{n+1} = X_n - dX = X_n - JInv(X_n) F(X_n), we solve J(X_n) dX = F(X_n) for dX:
|
|
234213
|
-
if (
|
|
234247
|
+
if (_SmallSystem__WEBPACK_IMPORTED_MODULE_3__.SmallSystem.linearSystem2d(jCol0.x, jCol1.x, jCol0.y, jCol1.y, fX.x, fX.y, this._currentStep))
|
|
234214
234248
|
return true;
|
|
234215
234249
|
return false;
|
|
234216
234250
|
}
|
|
@@ -234487,19 +234521,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
234487
234521
|
/* harmony export */ "ImplicitLineXY": () => (/* binding */ ImplicitLineXY),
|
|
234488
234522
|
/* harmony export */ "PowerPolynomial": () => (/* binding */ PowerPolynomial),
|
|
234489
234523
|
/* harmony export */ "SineCosinePolynomial": () => (/* binding */ SineCosinePolynomial),
|
|
234490
|
-
/* harmony export */ "SmallSystem": () => (/* binding */ SmallSystem),
|
|
234491
234524
|
/* harmony export */ "SphereImplicit": () => (/* binding */ SphereImplicit),
|
|
234492
234525
|
/* harmony export */ "TorusImplicit": () => (/* binding */ TorusImplicit),
|
|
234493
234526
|
/* harmony export */ "TrigPolynomial": () => (/* binding */ TrigPolynomial)
|
|
234494
234527
|
/* harmony export */ });
|
|
234495
|
-
/* harmony import */ var
|
|
234496
|
-
/* harmony import */ var
|
|
234497
|
-
/* harmony import */ var
|
|
234498
|
-
/* harmony import */ var
|
|
234499
|
-
/* harmony import */ var
|
|
234500
|
-
/* harmony import */ var
|
|
234501
|
-
/* harmony import */ var
|
|
234502
|
-
/* harmony import */ var
|
|
234528
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
234529
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
234530
|
+
/* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
|
|
234531
|
+
/* harmony import */ var _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/AngleSweep */ "../../core/geometry/lib/esm/geometry3d/AngleSweep.js");
|
|
234532
|
+
/* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
|
|
234533
|
+
/* harmony import */ var _geometry3d_LongitudeLatitudeAltitude__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/LongitudeLatitudeAltitude */ "../../core/geometry/lib/esm/geometry3d/LongitudeLatitudeAltitude.js");
|
|
234534
|
+
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
234535
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
234536
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
234503
234537
|
/*---------------------------------------------------------------------------------------------
|
|
234504
234538
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
234505
234539
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -234515,9 +234549,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
234515
234549
|
|
|
234516
234550
|
|
|
234517
234551
|
|
|
234518
|
-
|
|
234519
|
-
// cspell:
|
|
234520
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
234552
|
+
|
|
234553
|
+
// cspell:words Cardano internaldocs
|
|
234521
234554
|
/**
|
|
234522
234555
|
* degree 2 (quadratic) polynomial in for y = c0 + c1*x + c2*x^2
|
|
234523
234556
|
* @internal
|
|
@@ -234532,8 +234565,8 @@ class Degree2PowerPolynomial {
|
|
|
234532
234565
|
* @returns 0, 1, or 2 solutions of the usual quadratic (a*x*x + b * x + c = 0)
|
|
234533
234566
|
*/
|
|
234534
234567
|
static solveQuadratic(a, b, c) {
|
|
234535
|
-
const b1 =
|
|
234536
|
-
const c1 =
|
|
234568
|
+
const b1 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideFraction(b, a);
|
|
234569
|
+
const c1 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideFraction(c, a);
|
|
234537
234570
|
if (b1 !== undefined && c1 !== undefined) {
|
|
234538
234571
|
// now solving xx + b1*x + c1 = 0 -- i.e. implied "a" coefficient is 1 . .
|
|
234539
234572
|
const q = b1 * b1 - 4 * c1;
|
|
@@ -234548,7 +234581,7 @@ class Degree2PowerPolynomial {
|
|
|
234548
234581
|
return [root, root];
|
|
234549
234582
|
}
|
|
234550
234583
|
// "divide by a" failed. solve bx + c = 0
|
|
234551
|
-
const x =
|
|
234584
|
+
const x = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideFraction(-c, b);
|
|
234552
234585
|
if (x !== undefined)
|
|
234553
234586
|
return [x];
|
|
234554
234587
|
return undefined;
|
|
@@ -234588,7 +234621,7 @@ class Degree2PowerPolynomial {
|
|
|
234588
234621
|
}
|
|
234589
234622
|
/** Factor the polynomial in to the form `y0 + c * (x-x0)^2)`, i.e. complete the square. */
|
|
234590
234623
|
tryGetVertexFactorization() {
|
|
234591
|
-
const x =
|
|
234624
|
+
const x = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideFraction(-this.coffs[1], 2.0 * this.coffs[2]);
|
|
234592
234625
|
if (x !== undefined) {
|
|
234593
234626
|
const y = this.evaluate(x);
|
|
234594
234627
|
return { c: this.coffs[2], x0: x, y0: y };
|
|
@@ -234729,7 +234762,7 @@ class TorusImplicit {
|
|
|
234729
234762
|
// theta=0 point
|
|
234730
234763
|
const x0 = this.majorRadius + this.minorRadius * Math.cos(phiRadians);
|
|
234731
234764
|
const z0 = this.minorRadius * Math.sin(phiRadians);
|
|
234732
|
-
return
|
|
234765
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(c * x0, s * x0, z0);
|
|
234733
234766
|
}
|
|
234734
234767
|
/** Evaluate partial derivatives at angles (int radians) on major and minor circles. */
|
|
234735
234768
|
evaluateDerivativesThetaPhi(thetaRadians, phiRadians, dxdTheta, dxdPhi) {
|
|
@@ -234738,8 +234771,8 @@ class TorusImplicit {
|
|
|
234738
234771
|
const bx = this.minorRadius * Math.cos(phiRadians);
|
|
234739
234772
|
const bz = this.minorRadius * Math.sin(phiRadians);
|
|
234740
234773
|
const x0 = this.majorRadius + bx;
|
|
234741
|
-
|
|
234742
|
-
|
|
234774
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(-x0 * sTheta, x0 * cTheta, 0.0, dxdTheta);
|
|
234775
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(-cTheta * bz, -sTheta * bz, bx, dxdPhi);
|
|
234743
234776
|
}
|
|
234744
234777
|
/** Evaluate space point at major and minor angles (in radians) and distance from major hoop. */
|
|
234745
234778
|
evaluateThetaPhiDistance(thetaRadians, phiRadians, distance) {
|
|
@@ -234748,7 +234781,7 @@ class TorusImplicit {
|
|
|
234748
234781
|
// theta=0 point
|
|
234749
234782
|
const x0 = this.majorRadius + distance * Math.cos(phiRadians);
|
|
234750
234783
|
const z0 = distance * Math.sin(phiRadians);
|
|
234751
|
-
return
|
|
234784
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(c * x0, s * x0, z0);
|
|
234752
234785
|
}
|
|
234753
234786
|
/** Given an xyz coordinate in the local system of the toroid, compute the torus parametrization
|
|
234754
234787
|
* * theta = angular coordinate in xy plane
|
|
@@ -234760,19 +234793,19 @@ class TorusImplicit {
|
|
|
234760
234793
|
*/
|
|
234761
234794
|
xyzToThetaPhiDistance(xyz) {
|
|
234762
234795
|
const rho = xyz.magnitudeXY();
|
|
234763
|
-
const majorRadiusFactor =
|
|
234796
|
+
const majorRadiusFactor = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideFraction(this.majorRadius, rho);
|
|
234764
234797
|
let safeMajor;
|
|
234765
234798
|
let majorCirclePoint;
|
|
234766
234799
|
if (majorRadiusFactor) {
|
|
234767
234800
|
safeMajor = true;
|
|
234768
|
-
majorCirclePoint =
|
|
234801
|
+
majorCirclePoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(majorRadiusFactor * xyz.x, majorRadiusFactor * xyz.y, 0.0);
|
|
234769
234802
|
}
|
|
234770
234803
|
else {
|
|
234771
234804
|
safeMajor = false;
|
|
234772
|
-
majorCirclePoint =
|
|
234805
|
+
majorCirclePoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(xyz.x, xyz.y, 0.0);
|
|
234773
234806
|
}
|
|
234774
234807
|
const theta = safeMajor ? Math.atan2(xyz.y, xyz.x) : 0.0;
|
|
234775
|
-
const vectorFromMajorCircle =
|
|
234808
|
+
const vectorFromMajorCircle = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(majorCirclePoint, xyz);
|
|
234776
234809
|
const distance = vectorFromMajorCircle.magnitude();
|
|
234777
234810
|
const dRho = rho - this.majorRadius;
|
|
234778
234811
|
let safePhi;
|
|
@@ -234836,10 +234869,10 @@ class SphereImplicit {
|
|
|
234836
234869
|
}
|
|
234837
234870
|
/** Return the range of a uv-aligned patch of the sphere. */
|
|
234838
234871
|
static patchRangeStartEndRadians(center, radius, theta0Radians, theta1Radians, phi0Radians, phi1Radians, result) {
|
|
234839
|
-
const thetaSweep =
|
|
234840
|
-
const phiSweep =
|
|
234841
|
-
const range =
|
|
234842
|
-
const xyz =
|
|
234872
|
+
const thetaSweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.createStartEndRadians(theta0Radians, theta1Radians);
|
|
234873
|
+
const phiSweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.createStartEndRadians(phi0Radians, phi1Radians);
|
|
234874
|
+
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.createNull(result);
|
|
234875
|
+
const xyz = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create();
|
|
234843
234876
|
if (thetaSweep.isFullCircle && phiSweep.isFullLatitudeSweep) {
|
|
234844
234877
|
// full sphere, no trimming -- build directly
|
|
234845
234878
|
range.extendPoint(center);
|
|
@@ -234867,7 +234900,7 @@ class SphereImplicit {
|
|
|
234867
234900
|
}
|
|
234868
234901
|
// 4 boundary curves, each with 3 components ...
|
|
234869
234902
|
// BUT: phi should not extend beyond poles. Hence z extremes on constant theta curve will never be different from z of constant phi curve or of poles as tested above.
|
|
234870
|
-
const axisRange =
|
|
234903
|
+
const axisRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createNull();
|
|
234871
234904
|
const cosPhi0 = Math.cos(phi0Radians);
|
|
234872
234905
|
const cosPhi1 = Math.cos(phi1Radians);
|
|
234873
234906
|
const sinPhi0 = Math.sin(phi0Radians);
|
|
@@ -234918,9 +234951,9 @@ class SphereImplicit {
|
|
|
234918
234951
|
const ux = ray.direction.x;
|
|
234919
234952
|
const uy = ray.direction.y;
|
|
234920
234953
|
const uz = ray.direction.z;
|
|
234921
|
-
const a0 =
|
|
234922
|
-
const a1 = 2.0 *
|
|
234923
|
-
const a2 =
|
|
234954
|
+
const a0 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseSquaredXYZ(vx, vy, vz) - radius * radius;
|
|
234955
|
+
const a1 = 2.0 * _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.dotProductXYZXYZ(ux, uy, uz, vx, vy, vz);
|
|
234956
|
+
const a2 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseSquaredXYZ(ux, uy, uz);
|
|
234924
234957
|
const parameters = Degree2PowerPolynomial.solveQuadratic(a2, a1, a0);
|
|
234925
234958
|
if (rayFractions !== undefined)
|
|
234926
234959
|
rayFractions.length = 0;
|
|
@@ -234942,7 +234975,7 @@ class SphereImplicit {
|
|
|
234942
234975
|
xyz.push(point);
|
|
234943
234976
|
if (thetaPhiRadians !== undefined) {
|
|
234944
234977
|
const data = sphere.xyzToThetaPhiR(point);
|
|
234945
|
-
thetaPhiRadians.push(
|
|
234978
|
+
thetaPhiRadians.push(_geometry3d_LongitudeLatitudeAltitude__WEBPACK_IMPORTED_MODULE_5__.LongitudeLatitudeNumber.createRadians(data.thetaRadians, data.phiRadians));
|
|
234946
234979
|
}
|
|
234947
234980
|
}
|
|
234948
234981
|
}
|
|
@@ -234976,7 +235009,7 @@ class SphereImplicit {
|
|
|
234976
235009
|
const rs = this.radius * Math.sin(thetaRadians);
|
|
234977
235010
|
const cosPhi = Math.cos(phiRadians);
|
|
234978
235011
|
const sinPhi = Math.sin(phiRadians);
|
|
234979
|
-
return
|
|
235012
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(rc * cosPhi, rs * cosPhi, this.radius * sinPhi, result);
|
|
234980
235013
|
}
|
|
234981
235014
|
/**
|
|
234982
235015
|
* * convert radians to xyz on unit sphere
|
|
@@ -235001,8 +235034,8 @@ class SphereImplicit {
|
|
|
235001
235034
|
const rs = this.radius * Math.sin(thetaRadians);
|
|
235002
235035
|
const cosPhi = Math.cos(phiRadians);
|
|
235003
235036
|
const sinPhi = Math.sin(phiRadians);
|
|
235004
|
-
|
|
235005
|
-
|
|
235037
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(-rs * cosPhi, rc * cosPhi, 0.0, dxdTheta);
|
|
235038
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(-rc * sinPhi, -rs * sinPhi, this.radius * cosPhi, dxdPhi);
|
|
235006
235039
|
}
|
|
235007
235040
|
}
|
|
235008
235041
|
/** AnalyticRoots has static methods for solving quadratic, cubic, and quartic equations.
|
|
@@ -235131,7 +235164,7 @@ class AnalyticRoots {
|
|
|
235131
235164
|
* @param values array to expand
|
|
235132
235165
|
*/
|
|
235133
235166
|
static appendLinearRoot(c0, c1, values) {
|
|
235134
|
-
AnalyticRoots.appendSolution(
|
|
235167
|
+
AnalyticRoots.appendSolution(_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideFraction(-c0, c1), values);
|
|
235135
235168
|
}
|
|
235136
235169
|
/**
|
|
235137
235170
|
* * Compute the mean of all the entries in `data`
|
|
@@ -235162,7 +235195,7 @@ class AnalyticRoots {
|
|
|
235162
235195
|
*/
|
|
235163
235196
|
static appendQuadraticRoots(c, values) {
|
|
235164
235197
|
// Normal form: x^2 + 2px + q = 0
|
|
235165
|
-
const divFactor =
|
|
235198
|
+
const divFactor = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideFraction(1.0, c[2]);
|
|
235166
235199
|
if (!divFactor) {
|
|
235167
235200
|
this.appendLinearRoot(c[0], c[1], values);
|
|
235168
235201
|
return;
|
|
@@ -235178,8 +235211,8 @@ class AnalyticRoots {
|
|
|
235178
235211
|
return;
|
|
235179
235212
|
}
|
|
235180
235213
|
else if (D > 0) {
|
|
235181
|
-
const
|
|
235182
|
-
this.append2Solutions(
|
|
235214
|
+
const sqrtD = Math.sqrt(D);
|
|
235215
|
+
this.append2Solutions(sqrtD - p, -sqrtD - p, values);
|
|
235183
235216
|
return;
|
|
235184
235217
|
}
|
|
235185
235218
|
return;
|
|
@@ -235245,7 +235278,7 @@ class AnalyticRoots {
|
|
|
235245
235278
|
*/
|
|
235246
235279
|
/*
|
|
235247
235280
|
private static _appendCubicRootsUnsorted(c: Float64Array | number[], results: GrowableFloat64Array) {
|
|
235248
|
-
let
|
|
235281
|
+
let AA: number;
|
|
235249
235282
|
let p: number;
|
|
235250
235283
|
let q: number;
|
|
235251
235284
|
|
|
@@ -235266,9 +235299,9 @@ class AnalyticRoots {
|
|
|
235266
235299
|
// f' = 3y^2 + p
|
|
235267
235300
|
// local min/max at Y = +-sqrt (-p)
|
|
235268
235301
|
// f(+Y) = -p sqrt(-p) + 3p sqrt (-p) + 2q = 2 p sqrt (-p) + 2q
|
|
235269
|
-
|
|
235270
|
-
p = (3.0 * B -
|
|
235271
|
-
q = 1.0 / 2 * (2.0 / 27 * A *
|
|
235302
|
+
AA = A * A;
|
|
235303
|
+
p = (3.0 * B - AA) / 9.0;
|
|
235304
|
+
q = 1.0 / 2 * (2.0 / 27 * A * AA - 1.0 / 3 * A * B + C);
|
|
235272
235305
|
|
|
235273
235306
|
// Use Cardano formula
|
|
235274
235307
|
const cb_p: number = p * p * p;
|
|
@@ -235306,9 +235339,9 @@ class AnalyticRoots {
|
|
|
235306
235339
|
|
|
235307
235340
|
return;
|
|
235308
235341
|
} else { // One real solution
|
|
235309
|
-
const
|
|
235310
|
-
const u = this.cbrt(
|
|
235311
|
-
const v = -(this.cbrt(
|
|
235342
|
+
const sqrtD = Math.sqrt(D);
|
|
235343
|
+
const u = this.cbrt(sqrtD - q);
|
|
235344
|
+
const v = -(this.cbrt(sqrtD + q));
|
|
235312
235345
|
results.push(origin + u + v);
|
|
235313
235346
|
this.improveRoots(c, 3, results, false);
|
|
235314
235347
|
return;
|
|
@@ -235317,7 +235350,7 @@ class AnalyticRoots {
|
|
|
235317
235350
|
*/
|
|
235318
235351
|
/** Compute roots of cubic 'c[0] + c[1] * x + c[2] * x^2 + c[3] * x^3 */
|
|
235319
235352
|
static appendCubicRoots(c, results) {
|
|
235320
|
-
if (
|
|
235353
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideCoordinate(1.0, c[3]) !== undefined) {
|
|
235321
235354
|
this.appendFullCubicSolutions(c[3], c[2], c[1], c[0], results);
|
|
235322
235355
|
// EDL April 5, 2020 replace classic GraphicsGems solver by RWDNickalls.
|
|
235323
235356
|
// Don't know if improveRoots is needed.
|
|
@@ -235349,11 +235382,11 @@ class AnalyticRoots {
|
|
|
235349
235382
|
const D = c[0] * coffScale[0];
|
|
235350
235383
|
const origin = -0.25 * A;
|
|
235351
235384
|
// substitute x = y - A/4 to eliminate cubic term: y^4 + py^2 + qy + r = 0
|
|
235352
|
-
const
|
|
235353
|
-
const p = -0.375 *
|
|
235354
|
-
const q = 0.125 *
|
|
235355
|
-
const r = -0.01171875 *
|
|
235356
|
-
const cubicSolutions = new
|
|
235385
|
+
const AA = A * A;
|
|
235386
|
+
const p = -0.375 * AA + B;
|
|
235387
|
+
const q = 0.125 * AA * A - 0.5 * A * B + C;
|
|
235388
|
+
const r = -0.01171875 * AA * AA + 0.0625 * AA * B - 0.25 * A * C + D;
|
|
235389
|
+
const cubicSolutions = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__.GrowableFloat64Array();
|
|
235357
235390
|
if (this.isZero(r)) { // no absolute term: y(y^3 + py + q) = 0
|
|
235358
235391
|
coffs[0] = q;
|
|
235359
235392
|
coffs[1] = p;
|
|
@@ -235531,17 +235564,16 @@ class PowerPolynomial {
|
|
|
235531
235564
|
*/
|
|
235532
235565
|
class TrigPolynomial {
|
|
235533
235566
|
/**
|
|
235534
|
-
*
|
|
235535
|
-
*
|
|
235536
|
-
*
|
|
235537
|
-
* *
|
|
235538
|
-
* (
|
|
235539
|
-
*
|
|
235540
|
-
* @param
|
|
235541
|
-
*
|
|
235542
|
-
*
|
|
235543
|
-
*
|
|
235544
|
-
* stages of computation. A small fraction of this will be used as a zero tolerance
|
|
235567
|
+
* Find the roots of a univariate polynomial created from substituting the rational parameterization of the unit
|
|
235568
|
+
* circle into a trigonometric polynomial. Roots are returned as radian angles.
|
|
235569
|
+
* * Currently implemented for polynomials of degree <= 4.
|
|
235570
|
+
* * For example, the ellipse-ellipse intersection problem reduces to finding the roots of a quartic polynomial:
|
|
235571
|
+
* `p(t) = coff[0] + coff[1] t + coff[2] t^2 + coff[3] t^3 + coff[4] t^4`.
|
|
235572
|
+
* * Particular care is given to report a root at t = +/-infinity, which corresponds to the returned angle -pi/2.
|
|
235573
|
+
* @param coff coefficients in the power basis
|
|
235574
|
+
* @param nominalDegree degree of the polynomial under the most complex root case.
|
|
235575
|
+
* @param referenceCoefficient a number which represents the size of coefficients at various stages of computation.
|
|
235576
|
+
* A small fraction of this number will be used as a zero tolerance.
|
|
235545
235577
|
* @param radians roots are placed here.
|
|
235546
235578
|
* @return false if equation is all zeros. This usually means any angle is a solution.
|
|
235547
235579
|
*/
|
|
@@ -235559,7 +235591,7 @@ class TrigPolynomial {
|
|
|
235559
235591
|
let degree = nominalDegree;
|
|
235560
235592
|
while (degree > 0 && (Math.abs(coff[degree]) <= coffTol))
|
|
235561
235593
|
degree--;
|
|
235562
|
-
const roots = new
|
|
235594
|
+
const roots = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__.GrowableFloat64Array();
|
|
235563
235595
|
if (degree === -1) {
|
|
235564
235596
|
// do nothing
|
|
235565
235597
|
}
|
|
@@ -235581,41 +235613,42 @@ class TrigPolynomial {
|
|
|
235581
235613
|
}
|
|
235582
235614
|
else {
|
|
235583
235615
|
// TODO: WORK WITH BEZIER SOLVER
|
|
235616
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "Unimplemented degree in trig solver");
|
|
235584
235617
|
}
|
|
235585
235618
|
if (roots.length > 0) {
|
|
235586
|
-
//
|
|
235587
|
-
//
|
|
235619
|
+
// each solution t represents an angle with Math.Cos(theta) = C(t)/W(t) and sin(theta) = S(t)/W(t)
|
|
235620
|
+
// division by W has no effect on atan2 calculations, so we just compute S(t),C(t)
|
|
235588
235621
|
for (let i = 0; i < roots.length; i++) {
|
|
235589
235622
|
const ss = PowerPolynomial.evaluate(this.S, roots.atUncheckedIndex(i));
|
|
235590
235623
|
const cc = PowerPolynomial.evaluate(this.C, roots.atUncheckedIndex(i));
|
|
235591
235624
|
radians.push(Math.atan2(ss, cc));
|
|
235592
235625
|
}
|
|
235593
|
-
// each leading zero at the front of the coefficient array corresponds to a root at -PI/2.
|
|
235594
|
-
// only make one entry because we don't report multiplicity.
|
|
235595
|
-
if (degree < nominalDegree)
|
|
235596
|
-
radians.push(-0.5 * Math.PI);
|
|
235597
235626
|
}
|
|
235627
|
+
// If the tail of the coff array is zero, we solved a polynomial of lesser degree above, and
|
|
235628
|
+
// we report the skipped "root at infinity" as the corresponding angle -pi/2 (without multiplicity).
|
|
235629
|
+
// See core\geometry\internaldocs\unitCircleEllipseIntersection.md for details.
|
|
235630
|
+
if (degree < nominalDegree)
|
|
235631
|
+
radians.push(-0.5 * Math.PI);
|
|
235598
235632
|
}
|
|
235599
235633
|
return radians.length > 0;
|
|
235600
235634
|
}
|
|
235601
235635
|
/**
|
|
235602
|
-
* Compute intersections of unit circle `x^2 + y^2 = 1` with general quadric
|
|
235603
|
-
* `axx
|
|
235604
|
-
* Solutions are returned as angles. Sine and Cosine of the angles are the x, y results.
|
|
235636
|
+
* Compute intersections of the unit circle `x^2 + y^2 = 1` with the general quadric (conic)
|
|
235637
|
+
* `axx x^2 + axy xy + ayy y^2 + ax x + ay y + a = 0`.
|
|
235605
235638
|
* @param axx coefficient of x^2
|
|
235606
235639
|
* @param axy coefficient of xy
|
|
235607
235640
|
* @param ayy coefficient of y^2
|
|
235608
235641
|
* @param ax coefficient of x
|
|
235609
235642
|
* @param ay coefficient of y
|
|
235610
235643
|
* @param a constant coefficient
|
|
235611
|
-
* @param radians solution angles
|
|
235644
|
+
* @param radians up to 4 solution angles t in the quadric parameterization: x = cos(t), y = sin(t)
|
|
235612
235645
|
*/
|
|
235613
235646
|
static solveUnitCircleImplicitQuadricIntersection(axx, axy, ayy, ax, ay, a, radians) {
|
|
235614
235647
|
const coffs = new Float64Array(5);
|
|
235615
235648
|
PowerPolynomial.zero(coffs);
|
|
235616
235649
|
let degree;
|
|
235617
235650
|
// see core\geometry\internaldocs\unitCircleEllipseIntersection.md for derivation of these coefficients
|
|
235618
|
-
if (
|
|
235651
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseXYZ(axx, axy, ayy) > TrigPolynomial._coefficientRelTol * _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseXYZ(ax, ay, a)) {
|
|
235619
235652
|
PowerPolynomial.accumulate(coffs, this.CW, ax);
|
|
235620
235653
|
PowerPolynomial.accumulate(coffs, this.SW, ay);
|
|
235621
235654
|
PowerPolynomial.accumulate(coffs, this.WW, a);
|
|
@@ -235663,9 +235696,9 @@ class TrigPolynomial {
|
|
|
235663
235696
|
const acs = 2.0 * (ux * vx + uy * vy);
|
|
235664
235697
|
const ass = vx * vx + vy * vy;
|
|
235665
235698
|
const ac = 2.0 * (ux * cx + uy * cy);
|
|
235666
|
-
const
|
|
235699
|
+
const as = 2.0 * (vx * cx + vy * cy);
|
|
235667
235700
|
const a = cx * cx + cy * cy - 1.0;
|
|
235668
|
-
const status = this.solveUnitCircleImplicitQuadricIntersection(acc, acs, ass, ac,
|
|
235701
|
+
const status = this.solveUnitCircleImplicitQuadricIntersection(acc, acs, ass, ac, as, a, ellipseRadians);
|
|
235669
235702
|
for (const radians of ellipseRadians) {
|
|
235670
235703
|
const cc = Math.cos(radians);
|
|
235671
235704
|
const ss = Math.sin(radians);
|
|
@@ -235732,328 +235765,8 @@ TrigPolynomial.CC = Float64Array.from([1.0, -4.0, 4.0]);
|
|
|
235732
235765
|
/** Standard Basis coefficients for W(t) * W(t). */
|
|
235733
235766
|
TrigPolynomial.WW = Float64Array.from([1.0, -4.0, 8.0, -8.0, 4.0]);
|
|
235734
235767
|
/** Standard Basis coefficients for C(t) * C(t) - S(t) * S(t). */
|
|
235735
|
-
TrigPolynomial.
|
|
235768
|
+
TrigPolynomial.CCMinusSS = Float64Array.from([1.0, -4.0, 0.0, 8.0, -4.0]); // eslint-disable-line @typescript-eslint/naming-convention
|
|
235736
235769
|
TrigPolynomial._coefficientRelTol = 1.0e-12;
|
|
235737
|
-
/**
|
|
235738
|
-
* static methods for commonly appearing sets of equations in 2 or 3 variables
|
|
235739
|
-
* @public
|
|
235740
|
-
*/
|
|
235741
|
-
class SmallSystem {
|
|
235742
|
-
/**
|
|
235743
|
-
* Return true if lines (a0,a1) to (b0, b1) have a simple intersection.
|
|
235744
|
-
* Return the fractional (not xy) coordinates in result.x, result.y
|
|
235745
|
-
* @param a0 start point of line a
|
|
235746
|
-
* @param a1 end point of line a
|
|
235747
|
-
* @param b0 start point of line b
|
|
235748
|
-
* @param b1 end point of line b
|
|
235749
|
-
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
235750
|
-
*/
|
|
235751
|
-
static lineSegment2dXYTransverseIntersectionUnbounded(a0, a1, b0, b1, result) {
|
|
235752
|
-
const ux = a1.x - a0.x;
|
|
235753
|
-
const uy = a1.y - a0.y;
|
|
235754
|
-
const vx = b1.x - b0.x;
|
|
235755
|
-
const vy = b1.y - b0.y;
|
|
235756
|
-
const cx = b0.x - a0.x;
|
|
235757
|
-
const cy = b0.y - a0.y;
|
|
235758
|
-
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, vx, vy);
|
|
235759
|
-
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(cx, cy, vx, vy);
|
|
235760
|
-
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, cx, cy);
|
|
235761
|
-
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cv, uv);
|
|
235762
|
-
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cu, uv);
|
|
235763
|
-
if (s !== undefined && t !== undefined) {
|
|
235764
|
-
result.set(s, -t);
|
|
235765
|
-
return true;
|
|
235766
|
-
}
|
|
235767
|
-
result.set(0, 0);
|
|
235768
|
-
return false;
|
|
235769
|
-
}
|
|
235770
|
-
/**
|
|
235771
|
-
* * (ax0,ay0) to (ax0+ux,ay0+uy) are line A.
|
|
235772
|
-
* * (bx0,by0) to (bx0+vx,by0+vy) are lineB.
|
|
235773
|
-
* * Return true if the lines have a simple intersection.
|
|
235774
|
-
* * Return the fractional (not xy) coordinates in result.x, result.y
|
|
235775
|
-
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
235776
|
-
*/
|
|
235777
|
-
static lineSegmentXYUVTransverseIntersectionUnbounded(ax0, ay0, ux, uy, bx0, by0, vx, vy, result) {
|
|
235778
|
-
const cx = bx0 - ax0;
|
|
235779
|
-
const cy = by0 - ay0;
|
|
235780
|
-
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, vx, vy);
|
|
235781
|
-
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(cx, cy, vx, vy);
|
|
235782
|
-
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, cx, cy);
|
|
235783
|
-
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cv, uv);
|
|
235784
|
-
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cu, uv);
|
|
235785
|
-
if (s !== undefined && t !== undefined) {
|
|
235786
|
-
result.set(s, -t);
|
|
235787
|
-
return true;
|
|
235788
|
-
}
|
|
235789
|
-
result.set(0, 0);
|
|
235790
|
-
return false;
|
|
235791
|
-
}
|
|
235792
|
-
/**
|
|
235793
|
-
* Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts
|
|
235794
|
-
* Return the fractional (not xy) coordinates in result.x, result.y
|
|
235795
|
-
* @param a0 start point of line a
|
|
235796
|
-
* @param a1 end point of line a
|
|
235797
|
-
* @param b0 start point of line b
|
|
235798
|
-
* @param b1 end point of line b
|
|
235799
|
-
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
235800
|
-
*/
|
|
235801
|
-
static lineSegment3dXYTransverseIntersectionUnbounded(a0, a1, b0, b1, result) {
|
|
235802
|
-
const ux = a1.x - a0.x;
|
|
235803
|
-
const uy = a1.y - a0.y;
|
|
235804
|
-
const vx = b1.x - b0.x;
|
|
235805
|
-
const vy = b1.y - b0.y;
|
|
235806
|
-
const cx = b0.x - a0.x;
|
|
235807
|
-
const cy = b0.y - a0.y;
|
|
235808
|
-
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, vx, vy);
|
|
235809
|
-
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(cx, cy, vx, vy);
|
|
235810
|
-
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, cx, cy);
|
|
235811
|
-
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cv, uv);
|
|
235812
|
-
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cu, uv);
|
|
235813
|
-
if (s !== undefined && t !== undefined) {
|
|
235814
|
-
result.set(s, -t);
|
|
235815
|
-
return true;
|
|
235816
|
-
}
|
|
235817
|
-
result.set(0, 0);
|
|
235818
|
-
return false;
|
|
235819
|
-
}
|
|
235820
|
-
/**
|
|
235821
|
-
* Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts of WEIGHTED 4D Points
|
|
235822
|
-
* Return the fractional (not xy) coordinates in result.x, result.y
|
|
235823
|
-
* @param hA0 homogeneous start point of line a
|
|
235824
|
-
* @param hA1 homogeneous end point of line a
|
|
235825
|
-
* @param hB0 homogeneous start point of line b
|
|
235826
|
-
* @param hB1 homogeneous end point of line b
|
|
235827
|
-
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
235828
|
-
*/
|
|
235829
|
-
static lineSegment3dHXYTransverseIntersectionUnbounded(hA0, hA1, hB0, hB1, result) {
|
|
235830
|
-
// Considering only x,y,w parts....
|
|
235831
|
-
// Point Q along B is (in full homogeneous) `(1-lambda) B0 + lambda 1`
|
|
235832
|
-
// PointQ is colinear with A0,A1 when the determinant det (A0,A1,Q) is zero. (Each column takes xyw parts)
|
|
235833
|
-
const alpha0 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hA0.x, hA1.x, hB0.x, hA0.y, hA1.y, hB0.y, hA0.w, hA1.w, hB0.w);
|
|
235834
|
-
const alpha1 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hA0.x, hA1.x, hB1.x, hA0.y, hA1.y, hB1.y, hA0.w, hA1.w, hB1.w);
|
|
235835
|
-
const fractionB = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(-alpha0, alpha1 - alpha0);
|
|
235836
|
-
if (fractionB !== undefined) {
|
|
235837
|
-
const beta0 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hB0.x, hB1.x, hA0.x, hB0.y, hB1.y, hA0.y, hB0.w, hB1.w, hA0.w);
|
|
235838
|
-
const beta1 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hB0.x, hB1.x, hA1.x, hB0.y, hB1.y, hA1.y, hB0.w, hB1.w, hA1.w);
|
|
235839
|
-
const fractionA = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(-beta0, beta1 - beta0);
|
|
235840
|
-
if (fractionA !== undefined)
|
|
235841
|
-
return _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_6__.Vector2d.create(fractionA, fractionB, result);
|
|
235842
|
-
}
|
|
235843
|
-
return undefined;
|
|
235844
|
-
}
|
|
235845
|
-
/**
|
|
235846
|
-
* Return the line fraction at which the (homogeneous) line is closest to a space point as viewed in xy only.
|
|
235847
|
-
* @param hA0 homogeneous start point of line a
|
|
235848
|
-
* @param hA1 homogeneous end point of line a
|
|
235849
|
-
* @param spacePoint homogeneous point in space
|
|
235850
|
-
*/
|
|
235851
|
-
static lineSegment3dHXYClosestPointUnbounded(hA0, hA1, spacePoint) {
|
|
235852
|
-
// Considering only x,y,w parts....
|
|
235853
|
-
// weighted difference of (A1 w0 - A0 w1) is (cartesian) tangent vector along the line as viewed.
|
|
235854
|
-
// The perpendicular (pure vector) W = (-y,x) flip is the direction of projection
|
|
235855
|
-
// Point Q along A is (in full homogeneous) `(1-lambda) A0 + lambda 1 A1`
|
|
235856
|
-
// PointQ is colinear with spacePoint and and W when the xyw homogeneous determinant | Q W spacePoint | is zero.
|
|
235857
|
-
const tx = hA1.x * hA0.w - hA0.x * hA1.w;
|
|
235858
|
-
const ty = hA1.y * hA0.w - hA0.y * hA1.w;
|
|
235859
|
-
const det0 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hA0.x, -ty, spacePoint.x, hA0.y, tx, spacePoint.y, hA0.w, 0, spacePoint.w);
|
|
235860
|
-
const det1 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hA1.x, -ty, spacePoint.x, hA1.y, tx, spacePoint.y, hA1.w, 0, spacePoint.w);
|
|
235861
|
-
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(-det0, det1 - det0);
|
|
235862
|
-
}
|
|
235863
|
-
/**
|
|
235864
|
-
* Return the line fraction at which the line is closest to a space point as viewed in xy only.
|
|
235865
|
-
* @param pointA0 start point
|
|
235866
|
-
* @param pointA1 end point
|
|
235867
|
-
* @param spacePoint point in space
|
|
235868
|
-
*/
|
|
235869
|
-
static lineSegment3dXYClosestPointUnbounded(pointA0, pointA1, spacePoint) {
|
|
235870
|
-
// Considering only x,y parts....
|
|
235871
|
-
const ux = pointA1.x - pointA0.x;
|
|
235872
|
-
const uy = pointA1.y - pointA0.y;
|
|
235873
|
-
const uu = ux * ux + uy * uy;
|
|
235874
|
-
const vx = spacePoint.x - pointA0.x;
|
|
235875
|
-
const vy = spacePoint.y - pointA0.y;
|
|
235876
|
-
const uv = ux * vx + uy * vy;
|
|
235877
|
-
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(uv, uu);
|
|
235878
|
-
}
|
|
235879
|
-
/**
|
|
235880
|
-
* Return the line fraction at which the line is closest to a space point
|
|
235881
|
-
* @param pointA0 start point
|
|
235882
|
-
* @param pointA1 end point
|
|
235883
|
-
* @param spacePoint point in space
|
|
235884
|
-
*/
|
|
235885
|
-
static lineSegment3dClosestPointUnbounded(pointA0, pointA1, spacePoint) {
|
|
235886
|
-
const ux = pointA1.x - pointA0.x;
|
|
235887
|
-
const uy = pointA1.y - pointA0.y;
|
|
235888
|
-
const uz = pointA1.z - pointA0.z;
|
|
235889
|
-
const uu = ux * ux + uy * uy + uz * uz;
|
|
235890
|
-
const vx = spacePoint.x - pointA0.x;
|
|
235891
|
-
const vy = spacePoint.y - pointA0.y;
|
|
235892
|
-
const vz = spacePoint.z - pointA0.z;
|
|
235893
|
-
const uv = ux * vx + uy * vy + uz * vz;
|
|
235894
|
-
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(uv, uu);
|
|
235895
|
-
}
|
|
235896
|
-
/**
|
|
235897
|
-
* Return true if lines (a0,a1) to (b0, b1) have closest approach (go by each other) in 3d
|
|
235898
|
-
* Return the fractional (not xy) coordinates in result.x, result.y
|
|
235899
|
-
* @param a0 start point of line a
|
|
235900
|
-
* @param a1 end point of line a
|
|
235901
|
-
* @param b0 start point of line b
|
|
235902
|
-
* @param b1 end point of line b
|
|
235903
|
-
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
235904
|
-
*/
|
|
235905
|
-
static lineSegment3dClosestApproachUnbounded(a0, a1, b0, b1, result) {
|
|
235906
|
-
return this.ray3dXYZUVWClosestApproachUnbounded(a0.x, a0.y, a0.z, a1.x - a0.x, a1.y - a0.y, a1.z - a0.z, b0.x, b0.y, b0.z, b1.x - b0.x, b1.y - b0.y, b1.z - b0.z, result);
|
|
235907
|
-
}
|
|
235908
|
-
/**
|
|
235909
|
-
* Return true if the given rays have closest approach (go by each other) in 3d
|
|
235910
|
-
* Return the fractional (not xy) coordinates as x and y parts of a Point2d.
|
|
235911
|
-
* @param ax x-coordinate of the origin of the first ray
|
|
235912
|
-
* @param ay y-coordinate of the origin of the first ray
|
|
235913
|
-
* @param az z-coordinate of the origin of the first ray
|
|
235914
|
-
* @param au x-coordinate of the direction vector of the first ray
|
|
235915
|
-
* @param av y-coordinate of the direction vector of the first ray
|
|
235916
|
-
* @param aw z-coordinate of the direction vector of the first ray
|
|
235917
|
-
* @param bx x-coordinate of the origin of the second ray
|
|
235918
|
-
* @param by y-coordinate of the origin of the second ray
|
|
235919
|
-
* @param bz z-coordinate of the origin of the second ray
|
|
235920
|
-
* @param bu x-coordinate of the direction vector of the second ray
|
|
235921
|
-
* @param bv y-coordinate of the direction vector of the second ray
|
|
235922
|
-
* @param bw z-coordinate of the direction vector of the second ray
|
|
235923
|
-
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
235924
|
-
*/
|
|
235925
|
-
static ray3dXYZUVWClosestApproachUnbounded(ax, ay, az, au, av, aw, bx, by, bz, bu, bv, bw, result) {
|
|
235926
|
-
const cx = bx - ax;
|
|
235927
|
-
const cy = by - ay;
|
|
235928
|
-
const cz = bz - az;
|
|
235929
|
-
const uu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.hypotenuseSquaredXYZ(au, av, aw);
|
|
235930
|
-
const vv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.hypotenuseSquaredXYZ(bu, bv, bw);
|
|
235931
|
-
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(au, av, aw, bu, bv, bw);
|
|
235932
|
-
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(cx, cy, cz, au, av, aw);
|
|
235933
|
-
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(cx, cy, cz, bu, bv, bw);
|
|
235934
|
-
return SmallSystem.linearSystem2d(uu, -uv, uv, -vv, cu, cv, result);
|
|
235935
|
-
}
|
|
235936
|
-
/**
|
|
235937
|
-
* Solve the pair of linear equations
|
|
235938
|
-
* * `ux * x + vx * y = cx`
|
|
235939
|
-
* * `uy * x + vy * y = cy`
|
|
235940
|
-
* @param ux xx coefficient
|
|
235941
|
-
* @param vx xy coefficient
|
|
235942
|
-
* @param uy yx coefficient
|
|
235943
|
-
* @param vy yy coefficient
|
|
235944
|
-
* @param cx x right hand side
|
|
235945
|
-
* @param cy y right hand side
|
|
235946
|
-
* @param result (x,y) solution (MUST be preallocated by caller)
|
|
235947
|
-
*/
|
|
235948
|
-
static linearSystem2d(ux, vx, // first row of matrix
|
|
235949
|
-
uy, vy, // second row of matrix
|
|
235950
|
-
cx, cy, // right side
|
|
235951
|
-
result) {
|
|
235952
|
-
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, vx, vy);
|
|
235953
|
-
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(cx, cy, vx, vy);
|
|
235954
|
-
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, cx, cy);
|
|
235955
|
-
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cv, uv);
|
|
235956
|
-
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cu, uv);
|
|
235957
|
-
if (s !== undefined && t !== undefined) {
|
|
235958
|
-
result.set(s, t);
|
|
235959
|
-
return true;
|
|
235960
|
-
}
|
|
235961
|
-
result.set(0, 0);
|
|
235962
|
-
return false;
|
|
235963
|
-
}
|
|
235964
|
-
/**
|
|
235965
|
-
* Solve a linear system:
|
|
235966
|
-
* * x equation: `axx * u + axy * v + axz * w = cx`
|
|
235967
|
-
* * y equation: `ayx * u + ayy * v + ayz * w = cy`
|
|
235968
|
-
* * z equation: `azx * u + azy * v + azz * w = cz`
|
|
235969
|
-
* @param axx row 0, column 0 coefficient
|
|
235970
|
-
* @param axy row 0, column 1 coefficient
|
|
235971
|
-
* @param axz row 0, column 1 coefficient
|
|
235972
|
-
* @param ayx row 1, column 0 coefficient
|
|
235973
|
-
* @param ayy row 1, column 1 coefficient
|
|
235974
|
-
* @param ayz row 1, column 2 coefficient
|
|
235975
|
-
* @param azx row 2, column 0 coefficient
|
|
235976
|
-
* @param azy row 2, column 1 coefficient
|
|
235977
|
-
* @param azz row 2, column 2 coefficient
|
|
235978
|
-
* @param cx right hand side row 0 coefficient
|
|
235979
|
-
* @param cy right hand side row 1 coefficient
|
|
235980
|
-
* @param cz right hand side row 2 coefficient
|
|
235981
|
-
* @param result optional result.
|
|
235982
|
-
* @returns solution vector (u,v,w) or `undefined` if system is singular.
|
|
235983
|
-
*/
|
|
235984
|
-
static linearSystem3d(axx, axy, axz, // first row of matrix
|
|
235985
|
-
ayx, ayy, ayz, // second row of matrix
|
|
235986
|
-
azx, azy, azz, // second row of matrix
|
|
235987
|
-
cx, cy, cz, // right side
|
|
235988
|
-
result) {
|
|
235989
|
-
// determinants of various combinations of columns ...
|
|
235990
|
-
const detXYZ = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(axx, ayx, azx, axy, ayy, azy, axz, ayz, azz);
|
|
235991
|
-
const detCYZ = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(cx, cy, cz, axy, ayy, azy, axz, ayz, azz);
|
|
235992
|
-
const detXCZ = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(axx, ayx, azx, cx, cy, cz, axz, ayz, azz);
|
|
235993
|
-
const detXYC = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(axx, ayx, azx, axy, ayy, azy, cx, cy, cz);
|
|
235994
|
-
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(detCYZ, detXYZ);
|
|
235995
|
-
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(detXCZ, detXYZ);
|
|
235996
|
-
const u = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(detXYC, detXYZ);
|
|
235997
|
-
if (s !== undefined && t !== undefined && u !== undefined) {
|
|
235998
|
-
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(s, t, u, result);
|
|
235999
|
-
}
|
|
236000
|
-
return undefined;
|
|
236001
|
-
}
|
|
236002
|
-
/**
|
|
236003
|
-
* Compute the intersection of three planes.
|
|
236004
|
-
* @param xyzA point on the first plane
|
|
236005
|
-
* @param normalA normal of the first plane
|
|
236006
|
-
* @param xyzB point on the second plane
|
|
236007
|
-
* @param normalB normal of the second plane
|
|
236008
|
-
* @param xyzC point on the third plane
|
|
236009
|
-
* @param normalC normal of the third plane
|
|
236010
|
-
* @param result optional result
|
|
236011
|
-
* @returns intersection point of the three planes (as a Vector3d), or undefined if at least two planes are parallel.
|
|
236012
|
-
*/
|
|
236013
|
-
static intersect3Planes(xyzA, normalA, xyzB, normalB, xyzC, normalC, result) {
|
|
236014
|
-
return this.linearSystem3d(normalA.x, normalA.y, normalA.z, normalB.x, normalB.y, normalB.z, normalC.x, normalC.y, normalC.z, _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(xyzA.x, xyzA.y, xyzA.z, normalA.x, normalA.y, normalA.z), _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(xyzB.x, xyzB.y, xyzB.z, normalB.x, normalB.y, normalB.z), _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(xyzC.x, xyzC.y, xyzC.z, normalC.x, normalC.y, normalC.z), result);
|
|
236015
|
-
}
|
|
236016
|
-
/**
|
|
236017
|
-
* * in rowB, replace `rowB[j] += a * rowB[pivot] * rowA[j] / rowA[pivot]` for `j>pivot`
|
|
236018
|
-
* @param rowA row that does not change
|
|
236019
|
-
* @param pivotIndex index of pivot (divisor) in rowA.
|
|
236020
|
-
* @param rowB row where elimination occurs.
|
|
236021
|
-
*/
|
|
236022
|
-
static eliminateFromPivot(rowA, pivotIndex, rowB, a) {
|
|
236023
|
-
const n = rowA.length;
|
|
236024
|
-
let q = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(rowB[pivotIndex], rowA[pivotIndex]);
|
|
236025
|
-
if (q === undefined)
|
|
236026
|
-
return false;
|
|
236027
|
-
q *= a;
|
|
236028
|
-
for (let j = pivotIndex + 1; j < n; j++)
|
|
236029
|
-
rowB[j] += q * rowA[j];
|
|
236030
|
-
return true;
|
|
236031
|
-
}
|
|
236032
|
-
/**
|
|
236033
|
-
* Solve a pair of bilinear equations
|
|
236034
|
-
* * First equation: `a0 + b0 * u + c0 * v + d0 * u * v = 0`
|
|
236035
|
-
* * Second equation: `a0 + b0 * u + c0 * v + d0 * u * v = 0`
|
|
236036
|
-
*/
|
|
236037
|
-
static solveBilinearPair(a0, b0, c0, d0, a1, b1, c1, d1) {
|
|
236038
|
-
// constant linear, and quadratic coefficients for c0 + c1 * u + c2 * u*u = 0
|
|
236039
|
-
const e0 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(a0, a1, c0, c1);
|
|
236040
|
-
const e1 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(b0, b1, c0, c1) + _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(a0, a1, d0, d1);
|
|
236041
|
-
const e2 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(b0, b1, d0, d1);
|
|
236042
|
-
const uRoots = Degree2PowerPolynomial.solveQuadratic(e2, e1, e0);
|
|
236043
|
-
if (uRoots === undefined)
|
|
236044
|
-
return undefined;
|
|
236045
|
-
const uv = [];
|
|
236046
|
-
for (const u of uRoots) {
|
|
236047
|
-
const v0 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(-(a0 + b0 * u), c0 + d0 * u);
|
|
236048
|
-
const v1 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(-(a1 + b1 * u), c1 + d1 * u);
|
|
236049
|
-
if (v0 !== undefined)
|
|
236050
|
-
uv.push(_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_6__.Point2d.create(u, v0));
|
|
236051
|
-
else if (v1 !== undefined)
|
|
236052
|
-
uv.push(_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_6__.Point2d.create(u, v1));
|
|
236053
|
-
}
|
|
236054
|
-
return uv;
|
|
236055
|
-
}
|
|
236056
|
-
}
|
|
236057
235770
|
/**
|
|
236058
235771
|
* * bilinear expression
|
|
236059
235772
|
* * `f(u,v) = a + b * u * c * v + d * u * v`
|
|
@@ -236084,6 +235797,30 @@ class BilinearPolynomial {
|
|
|
236084
235797
|
static createUnitSquareValues(f00, f10, f01, f11) {
|
|
236085
235798
|
return new BilinearPolynomial(f00, f10, f10, f11 - f10 - f01);
|
|
236086
235799
|
}
|
|
235800
|
+
/**
|
|
235801
|
+
* Solve a pair of bilinear equations
|
|
235802
|
+
* * First equation: `a0 + b0 * u + c0 * v + d0 * u * v = 0`
|
|
235803
|
+
* * Second equation: `a1 + b1 * u + c1 * v + d1 * u * v = 0`
|
|
235804
|
+
*/
|
|
235805
|
+
static solveBilinearPair(a0, b0, c0, d0, a1, b1, c1, d1) {
|
|
235806
|
+
// constant linear, and quadratic coefficients for c0 + c1 * u + c2 * u*u = 0
|
|
235807
|
+
const e0 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.crossProductXYXY(a0, a1, c0, c1);
|
|
235808
|
+
const e1 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.crossProductXYXY(b0, b1, c0, c1) + _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.crossProductXYXY(a0, a1, d0, d1);
|
|
235809
|
+
const e2 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.crossProductXYXY(b0, b1, d0, d1);
|
|
235810
|
+
const uRoots = Degree2PowerPolynomial.solveQuadratic(e2, e1, e0);
|
|
235811
|
+
if (uRoots === undefined)
|
|
235812
|
+
return undefined;
|
|
235813
|
+
const uv = [];
|
|
235814
|
+
for (const u of uRoots) {
|
|
235815
|
+
const v0 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideFraction(-(a0 + b0 * u), c0 + d0 * u);
|
|
235816
|
+
const v1 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideFraction(-(a1 + b1 * u), c1 + d1 * u);
|
|
235817
|
+
if (v0 !== undefined)
|
|
235818
|
+
uv.push(_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_7__.Point2d.create(u, v0));
|
|
235819
|
+
else if (v1 !== undefined)
|
|
235820
|
+
uv.push(_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_7__.Point2d.create(u, v1));
|
|
235821
|
+
}
|
|
235822
|
+
return uv;
|
|
235823
|
+
}
|
|
236087
235824
|
/**
|
|
236088
235825
|
* Solve the simultaneous equations
|
|
236089
235826
|
* * `p(u,v) = pValue`
|
|
@@ -236094,7 +235831,7 @@ class BilinearPolynomial {
|
|
|
236094
235831
|
* @param qValue
|
|
236095
235832
|
*/
|
|
236096
235833
|
static solvePair(p, pValue, q, qValue) {
|
|
236097
|
-
return
|
|
235834
|
+
return BilinearPolynomial.solveBilinearPair(p.a - pValue, p.b, p.c, p.d, q.a - qValue, q.b, q.c, q.d);
|
|
236098
235835
|
}
|
|
236099
235836
|
}
|
|
236100
235837
|
/**
|
|
@@ -236125,21 +235862,21 @@ class SineCosinePolynomial {
|
|
|
236125
235862
|
}
|
|
236126
235863
|
/** Return the range of function values over the entire angle range. */
|
|
236127
235864
|
range(result) {
|
|
236128
|
-
const q =
|
|
236129
|
-
return
|
|
235865
|
+
const q = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseXY(this.cosineCoff, this.sineCoff);
|
|
235866
|
+
return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createXX(this.a - q, this.a + q, result);
|
|
236130
235867
|
}
|
|
236131
235868
|
/** Return the min and max values of the function over theta range from radians0 to radians1 inclusive. */
|
|
236132
235869
|
rangeInStartEndRadians(radians0, radians1, result) {
|
|
236133
|
-
if (
|
|
235870
|
+
if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_8__.Angle.isFullCircleRadians(radians1 - radians0))
|
|
236134
235871
|
return this.range(result);
|
|
236135
|
-
result =
|
|
235872
|
+
result = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createXX(this.evaluateRadians(radians0), this.evaluateRadians(radians1), result);
|
|
236136
235873
|
// angles of min and max ...
|
|
236137
235874
|
// angles for min and max of the sine wave . ..
|
|
236138
235875
|
const alphaA = Math.atan2(this.sineCoff, this.cosineCoff);
|
|
236139
235876
|
const alphaB = alphaA + Math.PI;
|
|
236140
|
-
if (
|
|
235877
|
+
if (_geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.isRadiansInStartEnd(alphaA, radians0, radians1))
|
|
236141
235878
|
result.extendX(this.evaluateRadians(alphaA));
|
|
236142
|
-
if (
|
|
235879
|
+
if (_geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.isRadiansInStartEnd(alphaB, radians0, radians1))
|
|
236143
235880
|
result.extendX(this.evaluateRadians(alphaB));
|
|
236144
235881
|
return result;
|
|
236145
235882
|
}
|
|
@@ -236175,14 +235912,14 @@ class ImplicitLineXY {
|
|
|
236175
235912
|
*/
|
|
236176
235913
|
convertToSegmentPoints(b) {
|
|
236177
235914
|
const q = Math.sqrt(this.ax * this.ax + this.ay * this.ay);
|
|
236178
|
-
const alpha =
|
|
235915
|
+
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideCoordinate(1.0, q, 1.0e10);
|
|
236179
235916
|
if (alpha === undefined)
|
|
236180
235917
|
return undefined;
|
|
236181
235918
|
const ux = alpha * this.ax;
|
|
236182
235919
|
const uy = alpha * this.ay;
|
|
236183
235920
|
const px = -alpha * ux;
|
|
236184
235921
|
const py = -alpha * uy;
|
|
236185
|
-
return [
|
|
235922
|
+
return [_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(px - b * uy, py + b * ux), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(px + b * uy, py - b * ux)];
|
|
236186
235923
|
}
|
|
236187
235924
|
/**
|
|
236188
235925
|
* Evaluate the half-space function at an xy point
|
|
@@ -236794,6 +236531,341 @@ function compareRange1dLexicalLowHigh(a, b) {
|
|
|
236794
236531
|
}
|
|
236795
236532
|
|
|
236796
236533
|
|
|
236534
|
+
/***/ }),
|
|
236535
|
+
|
|
236536
|
+
/***/ "../../core/geometry/lib/esm/numerics/SmallSystem.js":
|
|
236537
|
+
/*!***********************************************************!*\
|
|
236538
|
+
!*** ../../core/geometry/lib/esm/numerics/SmallSystem.js ***!
|
|
236539
|
+
\***********************************************************/
|
|
236540
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
236541
|
+
|
|
236542
|
+
"use strict";
|
|
236543
|
+
__webpack_require__.r(__webpack_exports__);
|
|
236544
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
236545
|
+
/* harmony export */ "SmallSystem": () => (/* binding */ SmallSystem)
|
|
236546
|
+
/* harmony export */ });
|
|
236547
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
236548
|
+
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
236549
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
236550
|
+
/* harmony import */ var _Polynomials__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
236551
|
+
/*---------------------------------------------------------------------------------------------
|
|
236552
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
236553
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
236554
|
+
*--------------------------------------------------------------------------------------------*/
|
|
236555
|
+
/** @packageDocumentation
|
|
236556
|
+
* @module Numerics
|
|
236557
|
+
*/
|
|
236558
|
+
|
|
236559
|
+
|
|
236560
|
+
|
|
236561
|
+
|
|
236562
|
+
// cspell:word XYUV
|
|
236563
|
+
/**
|
|
236564
|
+
* static methods for commonly appearing sets of equations in 2 or 3 variables
|
|
236565
|
+
* @public
|
|
236566
|
+
*/
|
|
236567
|
+
class SmallSystem {
|
|
236568
|
+
/**
|
|
236569
|
+
* Return true if lines (a0,a1) to (b0, b1) have a simple intersection.
|
|
236570
|
+
* Return the fractional (not xy) coordinates in result.x, result.y
|
|
236571
|
+
* @param a0 start point of line a
|
|
236572
|
+
* @param a1 end point of line a
|
|
236573
|
+
* @param b0 start point of line b
|
|
236574
|
+
* @param b1 end point of line b
|
|
236575
|
+
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
236576
|
+
*/
|
|
236577
|
+
static lineSegment2dXYTransverseIntersectionUnbounded(a0, a1, b0, b1, result) {
|
|
236578
|
+
const ux = a1.x - a0.x;
|
|
236579
|
+
const uy = a1.y - a0.y;
|
|
236580
|
+
const vx = b1.x - b0.x;
|
|
236581
|
+
const vy = b1.y - b0.y;
|
|
236582
|
+
const cx = b0.x - a0.x;
|
|
236583
|
+
const cy = b0.y - a0.y;
|
|
236584
|
+
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, vx, vy);
|
|
236585
|
+
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(cx, cy, vx, vy);
|
|
236586
|
+
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, cx, cy);
|
|
236587
|
+
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cv, uv);
|
|
236588
|
+
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cu, uv);
|
|
236589
|
+
if (s !== undefined && t !== undefined) {
|
|
236590
|
+
result.set(s, -t);
|
|
236591
|
+
return true;
|
|
236592
|
+
}
|
|
236593
|
+
result.set(0, 0);
|
|
236594
|
+
return false;
|
|
236595
|
+
}
|
|
236596
|
+
/**
|
|
236597
|
+
* * (ax0,ay0) to (ax0+ux,ay0+uy) are line A.
|
|
236598
|
+
* * (bx0,by0) to (bx0+vx,by0+vy) are lineB.
|
|
236599
|
+
* * Return true if the lines have a simple intersection.
|
|
236600
|
+
* * Return the fractional (not xy) coordinates in result.x, result.y
|
|
236601
|
+
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
236602
|
+
*/
|
|
236603
|
+
static lineSegmentXYUVTransverseIntersectionUnbounded(ax0, ay0, ux, uy, bx0, by0, vx, vy, result) {
|
|
236604
|
+
const cx = bx0 - ax0;
|
|
236605
|
+
const cy = by0 - ay0;
|
|
236606
|
+
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, vx, vy);
|
|
236607
|
+
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(cx, cy, vx, vy);
|
|
236608
|
+
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, cx, cy);
|
|
236609
|
+
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cv, uv);
|
|
236610
|
+
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cu, uv);
|
|
236611
|
+
if (s !== undefined && t !== undefined) {
|
|
236612
|
+
result.set(s, -t);
|
|
236613
|
+
return true;
|
|
236614
|
+
}
|
|
236615
|
+
result.set(0, 0);
|
|
236616
|
+
return false;
|
|
236617
|
+
}
|
|
236618
|
+
/**
|
|
236619
|
+
* Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts
|
|
236620
|
+
* Return the fractional (not xy) coordinates in result.x, result.y
|
|
236621
|
+
* @param a0 start point of line a
|
|
236622
|
+
* @param a1 end point of line a
|
|
236623
|
+
* @param b0 start point of line b
|
|
236624
|
+
* @param b1 end point of line b
|
|
236625
|
+
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
236626
|
+
*/
|
|
236627
|
+
static lineSegment3dXYTransverseIntersectionUnbounded(a0, a1, b0, b1, result) {
|
|
236628
|
+
const ux = a1.x - a0.x;
|
|
236629
|
+
const uy = a1.y - a0.y;
|
|
236630
|
+
const vx = b1.x - b0.x;
|
|
236631
|
+
const vy = b1.y - b0.y;
|
|
236632
|
+
const cx = b0.x - a0.x;
|
|
236633
|
+
const cy = b0.y - a0.y;
|
|
236634
|
+
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, vx, vy);
|
|
236635
|
+
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(cx, cy, vx, vy);
|
|
236636
|
+
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, cx, cy);
|
|
236637
|
+
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cv, uv);
|
|
236638
|
+
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cu, uv);
|
|
236639
|
+
if (s !== undefined && t !== undefined) {
|
|
236640
|
+
result.set(s, -t);
|
|
236641
|
+
return true;
|
|
236642
|
+
}
|
|
236643
|
+
result.set(0, 0);
|
|
236644
|
+
return false;
|
|
236645
|
+
}
|
|
236646
|
+
/**
|
|
236647
|
+
* Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts of WEIGHTED 4D Points
|
|
236648
|
+
* Return the fractional (not xy) coordinates in result.x, result.y
|
|
236649
|
+
* @param hA0 homogeneous start point of line a
|
|
236650
|
+
* @param hA1 homogeneous end point of line a
|
|
236651
|
+
* @param hB0 homogeneous start point of line b
|
|
236652
|
+
* @param hB1 homogeneous end point of line b
|
|
236653
|
+
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
236654
|
+
*/
|
|
236655
|
+
static lineSegment3dHXYTransverseIntersectionUnbounded(hA0, hA1, hB0, hB1, result) {
|
|
236656
|
+
// Considering only x,y,w parts....
|
|
236657
|
+
// Point Q along B is (in full homogeneous) `(1-lambda) B0 + lambda 1`
|
|
236658
|
+
// PointQ is colinear with A0,A1 when the determinant det (A0,A1,Q) is zero. (Each column takes xyw parts)
|
|
236659
|
+
const alpha0 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hA0.x, hA1.x, hB0.x, hA0.y, hA1.y, hB0.y, hA0.w, hA1.w, hB0.w);
|
|
236660
|
+
const alpha1 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hA0.x, hA1.x, hB1.x, hA0.y, hA1.y, hB1.y, hA0.w, hA1.w, hB1.w);
|
|
236661
|
+
const fractionB = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(-alpha0, alpha1 - alpha0);
|
|
236662
|
+
if (fractionB !== undefined) {
|
|
236663
|
+
const beta0 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hB0.x, hB1.x, hA0.x, hB0.y, hB1.y, hA0.y, hB0.w, hB1.w, hA0.w);
|
|
236664
|
+
const beta1 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hB0.x, hB1.x, hA1.x, hB0.y, hB1.y, hA1.y, hB0.w, hB1.w, hA1.w);
|
|
236665
|
+
const fractionA = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(-beta0, beta1 - beta0);
|
|
236666
|
+
if (fractionA !== undefined)
|
|
236667
|
+
return _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_1__.Vector2d.create(fractionA, fractionB, result);
|
|
236668
|
+
}
|
|
236669
|
+
return undefined;
|
|
236670
|
+
}
|
|
236671
|
+
/**
|
|
236672
|
+
* Return the line fraction at which the (homogeneous) line is closest to a space point as viewed in xy only.
|
|
236673
|
+
* @param hA0 homogeneous start point of line a
|
|
236674
|
+
* @param hA1 homogeneous end point of line a
|
|
236675
|
+
* @param spacePoint homogeneous point in space
|
|
236676
|
+
*/
|
|
236677
|
+
static lineSegment3dHXYClosestPointUnbounded(hA0, hA1, spacePoint) {
|
|
236678
|
+
// Considering only x,y,w parts....
|
|
236679
|
+
// weighted difference of (A1 w0 - A0 w1) is (cartesian) tangent vector along the line as viewed.
|
|
236680
|
+
// The perpendicular (pure vector) W = (-y,x) flip is the direction of projection
|
|
236681
|
+
// Point Q along A is (in full homogeneous) `(1-lambda) A0 + lambda 1 A1`
|
|
236682
|
+
// PointQ is colinear with spacePoint and and W when the xyw homogeneous determinant | Q W spacePoint | is zero.
|
|
236683
|
+
const tx = hA1.x * hA0.w - hA0.x * hA1.w;
|
|
236684
|
+
const ty = hA1.y * hA0.w - hA0.y * hA1.w;
|
|
236685
|
+
const det0 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hA0.x, -ty, spacePoint.x, hA0.y, tx, spacePoint.y, hA0.w, 0, spacePoint.w);
|
|
236686
|
+
const det1 = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(hA1.x, -ty, spacePoint.x, hA1.y, tx, spacePoint.y, hA1.w, 0, spacePoint.w);
|
|
236687
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(-det0, det1 - det0);
|
|
236688
|
+
}
|
|
236689
|
+
/**
|
|
236690
|
+
* Return the line fraction at which the line is closest to a space point as viewed in xy only.
|
|
236691
|
+
* @param pointA0 start point
|
|
236692
|
+
* @param pointA1 end point
|
|
236693
|
+
* @param spacePoint point in space
|
|
236694
|
+
*/
|
|
236695
|
+
static lineSegment3dXYClosestPointUnbounded(pointA0, pointA1, spacePoint) {
|
|
236696
|
+
// Considering only x,y parts....
|
|
236697
|
+
const ux = pointA1.x - pointA0.x;
|
|
236698
|
+
const uy = pointA1.y - pointA0.y;
|
|
236699
|
+
const uu = ux * ux + uy * uy;
|
|
236700
|
+
const vx = spacePoint.x - pointA0.x;
|
|
236701
|
+
const vy = spacePoint.y - pointA0.y;
|
|
236702
|
+
const uv = ux * vx + uy * vy;
|
|
236703
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(uv, uu);
|
|
236704
|
+
}
|
|
236705
|
+
/**
|
|
236706
|
+
* Return the line fraction at which the line is closest to a space point
|
|
236707
|
+
* @param pointA0 start point
|
|
236708
|
+
* @param pointA1 end point
|
|
236709
|
+
* @param spacePoint point in space
|
|
236710
|
+
*/
|
|
236711
|
+
static lineSegment3dClosestPointUnbounded(pointA0, pointA1, spacePoint) {
|
|
236712
|
+
const ux = pointA1.x - pointA0.x;
|
|
236713
|
+
const uy = pointA1.y - pointA0.y;
|
|
236714
|
+
const uz = pointA1.z - pointA0.z;
|
|
236715
|
+
const uu = ux * ux + uy * uy + uz * uz;
|
|
236716
|
+
const vx = spacePoint.x - pointA0.x;
|
|
236717
|
+
const vy = spacePoint.y - pointA0.y;
|
|
236718
|
+
const vz = spacePoint.z - pointA0.z;
|
|
236719
|
+
const uv = ux * vx + uy * vy + uz * vz;
|
|
236720
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(uv, uu);
|
|
236721
|
+
}
|
|
236722
|
+
/**
|
|
236723
|
+
* Return true if lines (a0,a1) to (b0, b1) have closest approach (go by each other) in 3d
|
|
236724
|
+
* Return the fractional (not xy) coordinates in result.x, result.y
|
|
236725
|
+
* @param a0 start point of line a
|
|
236726
|
+
* @param a1 end point of line a
|
|
236727
|
+
* @param b0 start point of line b
|
|
236728
|
+
* @param b1 end point of line b
|
|
236729
|
+
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
236730
|
+
*/
|
|
236731
|
+
static lineSegment3dClosestApproachUnbounded(a0, a1, b0, b1, result) {
|
|
236732
|
+
return this.ray3dXYZUVWClosestApproachUnbounded(a0.x, a0.y, a0.z, a1.x - a0.x, a1.y - a0.y, a1.z - a0.z, b0.x, b0.y, b0.z, b1.x - b0.x, b1.y - b0.y, b1.z - b0.z, result);
|
|
236733
|
+
}
|
|
236734
|
+
/**
|
|
236735
|
+
* Return true if the given rays have closest approach (go by each other) in 3d
|
|
236736
|
+
* Return the fractional (not xy) coordinates as x and y parts of a Point2d.
|
|
236737
|
+
* @param ax x-coordinate of the origin of the first ray
|
|
236738
|
+
* @param ay y-coordinate of the origin of the first ray
|
|
236739
|
+
* @param az z-coordinate of the origin of the first ray
|
|
236740
|
+
* @param au x-coordinate of the direction vector of the first ray
|
|
236741
|
+
* @param av y-coordinate of the direction vector of the first ray
|
|
236742
|
+
* @param aw z-coordinate of the direction vector of the first ray
|
|
236743
|
+
* @param bx x-coordinate of the origin of the second ray
|
|
236744
|
+
* @param by y-coordinate of the origin of the second ray
|
|
236745
|
+
* @param bz z-coordinate of the origin of the second ray
|
|
236746
|
+
* @param bu x-coordinate of the direction vector of the second ray
|
|
236747
|
+
* @param bv y-coordinate of the direction vector of the second ray
|
|
236748
|
+
* @param bw z-coordinate of the direction vector of the second ray
|
|
236749
|
+
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
236750
|
+
*/
|
|
236751
|
+
static ray3dXYZUVWClosestApproachUnbounded(ax, ay, az, au, av, aw, bx, by, bz, bu, bv, bw, result) {
|
|
236752
|
+
const cx = bx - ax;
|
|
236753
|
+
const cy = by - ay;
|
|
236754
|
+
const cz = bz - az;
|
|
236755
|
+
const uu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.hypotenuseSquaredXYZ(au, av, aw);
|
|
236756
|
+
const vv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.hypotenuseSquaredXYZ(bu, bv, bw);
|
|
236757
|
+
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(au, av, aw, bu, bv, bw);
|
|
236758
|
+
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(cx, cy, cz, au, av, aw);
|
|
236759
|
+
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(cx, cy, cz, bu, bv, bw);
|
|
236760
|
+
return SmallSystem.linearSystem2d(uu, -uv, uv, -vv, cu, cv, result);
|
|
236761
|
+
}
|
|
236762
|
+
/**
|
|
236763
|
+
* Solve the pair of linear equations
|
|
236764
|
+
* * `ux * x + vx * y = cx`
|
|
236765
|
+
* * `uy * x + vy * y = cy`
|
|
236766
|
+
* @param ux xx coefficient
|
|
236767
|
+
* @param vx xy coefficient
|
|
236768
|
+
* @param uy yx coefficient
|
|
236769
|
+
* @param vy yy coefficient
|
|
236770
|
+
* @param cx x right hand side
|
|
236771
|
+
* @param cy y right hand side
|
|
236772
|
+
* @param result (x,y) solution (MUST be preallocated by caller)
|
|
236773
|
+
*/
|
|
236774
|
+
static linearSystem2d(ux, vx, // first row of matrix
|
|
236775
|
+
uy, vy, // second row of matrix
|
|
236776
|
+
cx, cy, // right side
|
|
236777
|
+
result) {
|
|
236778
|
+
const uv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, vx, vy);
|
|
236779
|
+
const cv = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(cx, cy, vx, vy);
|
|
236780
|
+
const cu = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(ux, uy, cx, cy);
|
|
236781
|
+
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cv, uv);
|
|
236782
|
+
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(cu, uv);
|
|
236783
|
+
if (s !== undefined && t !== undefined) {
|
|
236784
|
+
result.set(s, t);
|
|
236785
|
+
return true;
|
|
236786
|
+
}
|
|
236787
|
+
result.set(0, 0);
|
|
236788
|
+
return false;
|
|
236789
|
+
}
|
|
236790
|
+
/**
|
|
236791
|
+
* Solve a linear system:
|
|
236792
|
+
* * x equation: `axx * u + axy * v + axz * w = cx`
|
|
236793
|
+
* * y equation: `ayx * u + ayy * v + ayz * w = cy`
|
|
236794
|
+
* * z equation: `azx * u + azy * v + azz * w = cz`
|
|
236795
|
+
* @param axx row 0, column 0 coefficient
|
|
236796
|
+
* @param axy row 0, column 1 coefficient
|
|
236797
|
+
* @param axz row 0, column 1 coefficient
|
|
236798
|
+
* @param ayx row 1, column 0 coefficient
|
|
236799
|
+
* @param ayy row 1, column 1 coefficient
|
|
236800
|
+
* @param ayz row 1, column 2 coefficient
|
|
236801
|
+
* @param azx row 2, column 0 coefficient
|
|
236802
|
+
* @param azy row 2, column 1 coefficient
|
|
236803
|
+
* @param azz row 2, column 2 coefficient
|
|
236804
|
+
* @param cx right hand side row 0 coefficient
|
|
236805
|
+
* @param cy right hand side row 1 coefficient
|
|
236806
|
+
* @param cz right hand side row 2 coefficient
|
|
236807
|
+
* @param result optional result.
|
|
236808
|
+
* @returns solution vector (u,v,w) or `undefined` if system is singular.
|
|
236809
|
+
*/
|
|
236810
|
+
static linearSystem3d(axx, axy, axz, // first row of matrix
|
|
236811
|
+
ayx, ayy, ayz, // second row of matrix
|
|
236812
|
+
azx, azy, azz, // second row of matrix
|
|
236813
|
+
cx, cy, cz, // right side
|
|
236814
|
+
result) {
|
|
236815
|
+
// determinants of various combinations of columns ...
|
|
236816
|
+
const detXYZ = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(axx, ayx, azx, axy, ayy, azy, axz, ayz, azz);
|
|
236817
|
+
const detCYZ = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(cx, cy, cz, axy, ayy, azy, axz, ayz, azz);
|
|
236818
|
+
const detXCZ = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(axx, ayx, azx, cx, cy, cz, axz, ayz, azz);
|
|
236819
|
+
const detXYC = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(axx, ayx, azx, axy, ayy, azy, cx, cy, cz);
|
|
236820
|
+
const s = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(detCYZ, detXYZ);
|
|
236821
|
+
const t = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(detXCZ, detXYZ);
|
|
236822
|
+
const u = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(detXYC, detXYZ);
|
|
236823
|
+
if (s !== undefined && t !== undefined && u !== undefined) {
|
|
236824
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(s, t, u, result);
|
|
236825
|
+
}
|
|
236826
|
+
return undefined;
|
|
236827
|
+
}
|
|
236828
|
+
/**
|
|
236829
|
+
* Compute the intersection of three planes.
|
|
236830
|
+
* @param xyzA point on the first plane
|
|
236831
|
+
* @param normalA normal of the first plane
|
|
236832
|
+
* @param xyzB point on the second plane
|
|
236833
|
+
* @param normalB normal of the second plane
|
|
236834
|
+
* @param xyzC point on the third plane
|
|
236835
|
+
* @param normalC normal of the third plane
|
|
236836
|
+
* @param result optional result
|
|
236837
|
+
* @returns intersection point of the three planes (as a Vector3d), or undefined if at least two planes are parallel.
|
|
236838
|
+
*/
|
|
236839
|
+
static intersect3Planes(xyzA, normalA, xyzB, normalB, xyzC, normalC, result) {
|
|
236840
|
+
return this.linearSystem3d(normalA.x, normalA.y, normalA.z, normalB.x, normalB.y, normalB.z, normalC.x, normalC.y, normalC.z, _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(xyzA.x, xyzA.y, xyzA.z, normalA.x, normalA.y, normalA.z), _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(xyzB.x, xyzB.y, xyzB.z, normalB.x, normalB.y, normalB.z), _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.dotProductXYZXYZ(xyzC.x, xyzC.y, xyzC.z, normalC.x, normalC.y, normalC.z), result);
|
|
236841
|
+
}
|
|
236842
|
+
/**
|
|
236843
|
+
* * in rowB, replace `rowB[j] += a * rowB[pivot] * rowA[j] / rowA[pivot]` for `j>pivot`
|
|
236844
|
+
* @param rowA row that does not change
|
|
236845
|
+
* @param pivotIndex index of pivot (divisor) in rowA.
|
|
236846
|
+
* @param rowB row where elimination occurs.
|
|
236847
|
+
*/
|
|
236848
|
+
static eliminateFromPivot(rowA, pivotIndex, rowB, a) {
|
|
236849
|
+
const n = rowA.length;
|
|
236850
|
+
let q = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.conditionalDivideFraction(rowB[pivotIndex], rowA[pivotIndex]);
|
|
236851
|
+
if (q === undefined)
|
|
236852
|
+
return false;
|
|
236853
|
+
q *= a;
|
|
236854
|
+
for (let j = pivotIndex + 1; j < n; j++)
|
|
236855
|
+
rowB[j] += q * rowA[j];
|
|
236856
|
+
return true;
|
|
236857
|
+
}
|
|
236858
|
+
/**
|
|
236859
|
+
* Solve a pair of bilinear equations
|
|
236860
|
+
* * First equation: `a0 + b0 * u + c0 * v + d0 * u * v = 0`
|
|
236861
|
+
* * Second equation: `a1 + b1 * u + c1 * v + d1 * u * v = 0`
|
|
236862
|
+
*/
|
|
236863
|
+
static solveBilinearPair(a0, b0, c0, d0, a1, b1, c1, d1) {
|
|
236864
|
+
return _Polynomials__WEBPACK_IMPORTED_MODULE_3__.BilinearPolynomial.solveBilinearPair(a0, b0, c0, d0, a1, b1, c1, d1);
|
|
236865
|
+
}
|
|
236866
|
+
}
|
|
236867
|
+
|
|
236868
|
+
|
|
236797
236869
|
/***/ }),
|
|
236798
236870
|
|
|
236799
236871
|
/***/ "../../core/geometry/lib/esm/numerics/TriDiagonalSystem.js":
|
|
@@ -247343,16 +247415,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
247343
247415
|
/* harmony export */ "OffsetMeshContext": () => (/* binding */ OffsetMeshContext),
|
|
247344
247416
|
/* harmony export */ "SectorOffsetProperties": () => (/* binding */ SectorOffsetProperties)
|
|
247345
247417
|
/* harmony export */ });
|
|
247346
|
-
/* harmony import */ var
|
|
247418
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
247419
|
+
/* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
|
|
247347
247420
|
/* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
|
|
247348
247421
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
247349
247422
|
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
247423
|
+
/* harmony import */ var _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geometry3d/PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
|
|
247350
247424
|
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
247425
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
247351
247426
|
/* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
247352
247427
|
/* harmony import */ var _topology_HalfEdgeGraphFromIndexedLoopsContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../topology/HalfEdgeGraphFromIndexedLoopsContext */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js");
|
|
247353
|
-
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
247354
|
-
/* harmony import */ var _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geometry3d/PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
|
|
247355
|
-
/* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
|
|
247356
247428
|
/*---------------------------------------------------------------------------------------------
|
|
247357
247429
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
247358
247430
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -248093,7 +248165,7 @@ class OffsetMeshContext {
|
|
|
248093
248165
|
const sectorA = nodeA.edgeTag;
|
|
248094
248166
|
const sectorB = nodeB.edgeTag;
|
|
248095
248167
|
const sectorC = nodeC.edgeTag;
|
|
248096
|
-
const vector =
|
|
248168
|
+
const vector = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__.SmallSystem.intersect3Planes(sectorA.xyz, sectorA.normal, sectorB.xyz, sectorB.normal, sectorC.xyz, sectorC.normal, result);
|
|
248097
248169
|
return vector;
|
|
248098
248170
|
}
|
|
248099
248171
|
/** Compute the point of intersection of the planes in the sectors of 3 half edges */
|
|
@@ -248106,7 +248178,7 @@ class OffsetMeshContext {
|
|
|
248106
248178
|
for (const sector of [sectorA, sectorB, sectorC])
|
|
248107
248179
|
emitSector(sector);
|
|
248108
248180
|
}
|
|
248109
|
-
const vector =
|
|
248181
|
+
const vector = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__.SmallSystem.intersect3Planes(sectorA.xyz, sectorA.normal, sectorB.xyz, sectorB.normal, sectorC.xyz, sectorC.normal, result);
|
|
248110
248182
|
if (OffsetMeshContext.stringDebugFunction !== undefined) {
|
|
248111
248183
|
if (vector === undefined)
|
|
248112
248184
|
OffsetMeshContext.stringDebugFunction(" NO INTERSECTION");
|
|
@@ -248120,7 +248192,7 @@ class OffsetMeshContext {
|
|
|
248120
248192
|
const sectorA = nodeA.edgeTag;
|
|
248121
248193
|
const sectorB = nodeB.edgeTag;
|
|
248122
248194
|
const normalC = sectorA.normal.crossProduct(sectorB.normal);
|
|
248123
|
-
return
|
|
248195
|
+
return _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__.SmallSystem.intersect3Planes(sectorA.xyz, sectorA.normal, sectorB.xyz, sectorB.normal, sectorB.xyz, normalC, result);
|
|
248124
248196
|
}
|
|
248125
248197
|
/**
|
|
248126
248198
|
* * at input, graph has all original faces and edges
|
|
@@ -263058,7 +263130,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
263058
263130
|
/* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
|
|
263059
263131
|
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
263060
263132
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
263061
|
-
/* harmony import */ var
|
|
263133
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
263062
263134
|
/* harmony import */ var _MaskManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MaskManager */ "../../core/geometry/lib/esm/topology/MaskManager.js");
|
|
263063
263135
|
/*---------------------------------------------------------------------------------------------
|
|
263064
263136
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -264151,7 +264223,7 @@ class HalfEdge {
|
|
|
264151
264223
|
// (nodeA1.x - nodeA0.x)ta + (nodeB0.x - nodeB1.x)tb = nodeB0.x - nodeA0.x
|
|
264152
264224
|
// (nodeA1.y - nodeA0.y)ta + (nodeB0.y - nodeB1.y)tb = nodeB0.y - nodeA0.y
|
|
264153
264225
|
// Proof can be found at geometry/internaldocs/Graph.md
|
|
264154
|
-
if (
|
|
264226
|
+
if (_numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_4__.SmallSystem.linearSystem2d(nodeA1.x - nodeA0.x, nodeB0.x - nodeB1.x, nodeA1.y - nodeA0.y, nodeB0.y - nodeB1.y, nodeB0.x - nodeA0.x, nodeB0.y - nodeA0.y, result))
|
|
264155
264227
|
return result;
|
|
264156
264228
|
return undefined;
|
|
264157
264229
|
}
|
|
@@ -266266,7 +266338,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
266266
266338
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
266267
266339
|
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
266268
266340
|
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
266269
|
-
/* harmony import */ var
|
|
266341
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
266270
266342
|
/* harmony import */ var _Graph__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
266271
266343
|
/* harmony import */ var _HalfEdgeMarkSet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HalfEdgeMarkSet */ "../../core/geometry/lib/esm/topology/HalfEdgeMarkSet.js");
|
|
266272
266344
|
/* harmony import */ var _HalfEdgePointInGraphSearch__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./HalfEdgePointInGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgePointInGraphSearch.js");
|
|
@@ -266370,7 +266442,7 @@ class InsertAndRetriangulateContext {
|
|
|
266370
266442
|
let distanceC;
|
|
266371
266443
|
for (const nodeA of this._graph.allHalfEdges) {
|
|
266372
266444
|
const nodeB = nodeA.faceSuccessor;
|
|
266373
|
-
fractionC =
|
|
266445
|
+
fractionC = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegment3dXYClosestPointUnbounded(nodeA, nodeB, xyz);
|
|
266374
266446
|
if (fractionC !== undefined) {
|
|
266375
266447
|
if (fractionC > 1.0) {
|
|
266376
266448
|
distanceC = xyz.distanceXY(nodeB);
|
|
@@ -266736,7 +266808,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
266736
266808
|
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
266737
266809
|
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
266738
266810
|
/* harmony import */ var _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../numerics/ClusterableArray */ "../../core/geometry/lib/esm/numerics/ClusterableArray.js");
|
|
266739
|
-
/* harmony import */ var
|
|
266811
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
266740
266812
|
/* harmony import */ var _Graph__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
266741
266813
|
/* harmony import */ var _HalfEdgePriorityQueue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./HalfEdgePriorityQueue */ "../../core/geometry/lib/esm/topology/HalfEdgePriorityQueue.js");
|
|
266742
266814
|
/* harmony import */ var _RegularizeFace__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
|
|
@@ -267214,7 +267286,7 @@ class HalfEdgeGraphMerge {
|
|
|
267214
267286
|
const vx = nodeB1.x - bx0;
|
|
267215
267287
|
const vy = nodeB1.y - by0;
|
|
267216
267288
|
// cspell:word lineSegmentXYUVTransverseIntersectionUnbounded
|
|
267217
|
-
if (
|
|
267289
|
+
if (_numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegmentXYUVTransverseIntersectionUnbounded(ax0, ay0, ux, uy, bx0, by0, vx, vy, fractions)) {
|
|
267218
267290
|
pointA.x = ax0 + fractions.x * ux;
|
|
267219
267291
|
pointA.y = ay0 + fractions.x * uy;
|
|
267220
267292
|
pointB.x = bx0 + fractions.y * vx;
|
|
@@ -304206,7 +304278,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
304206
304278
|
/***/ ((module) => {
|
|
304207
304279
|
|
|
304208
304280
|
"use strict";
|
|
304209
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.10.0-dev.
|
|
304281
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.10.0-dev.28","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.10.0-dev.28","@itwin/core-bentley":"workspace:^4.10.0-dev.28","@itwin/core-common":"workspace:^4.10.0-dev.28","@itwin/core-geometry":"workspace:^4.10.0-dev.28","@itwin/core-orbitgt":"workspace:^4.10.0-dev.28","@itwin/core-quantity":"workspace:^4.10.0-dev.28"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.2","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.2","source-map-loader":"^4.0.0","typescript":"~5.3.3","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.2.5","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
304210
304282
|
|
|
304211
304283
|
/***/ })
|
|
304212
304284
|
|