@itwin/ecschema-rpcinterface-tests 5.9.0-dev.15 → 5.9.0-dev.16
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.
|
@@ -29047,7 +29047,7 @@ class DbQueryError extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Bent
|
|
|
29047
29047
|
this.request = request;
|
|
29048
29048
|
}
|
|
29049
29049
|
static throwIfError(response, request) {
|
|
29050
|
-
if (response.status >= DbResponseStatus.Error) {
|
|
29050
|
+
if (response.status >= (DbResponseStatus.Error)) {
|
|
29051
29051
|
throw new DbQueryError(response, request);
|
|
29052
29052
|
}
|
|
29053
29053
|
if (response.status === DbResponseStatus.Cancel) {
|
|
@@ -34959,12 +34959,11 @@ var HiddenLine;
|
|
|
34959
34959
|
*/
|
|
34960
34960
|
width;
|
|
34961
34961
|
constructor(json, hidden) {
|
|
34962
|
-
if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.isEmptyObjectOrUndefined(json)) {
|
|
34962
|
+
if (!json || _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.isEmptyObjectOrUndefined(json)) {
|
|
34963
34963
|
if (hidden)
|
|
34964
34964
|
this.pattern = _LinePixels__WEBPACK_IMPORTED_MODULE_2__.LinePixels.HiddenLine;
|
|
34965
34965
|
return;
|
|
34966
34966
|
}
|
|
34967
|
-
json = json; // per JsonUtils.isEmptyObjectOrUndefined()
|
|
34968
34967
|
if (undefined !== json.color && false !== json.ovrColor)
|
|
34969
34968
|
this.color = _ColorDef__WEBPACK_IMPORTED_MODULE_1__.ColorDef.fromJSON(json.color);
|
|
34970
34969
|
if (undefined !== json.pattern) {
|
|
@@ -65681,7 +65680,7 @@ var XmlSerializationUtils;
|
|
|
65681
65680
|
async function writePrimitiveProperty(propertyClass, propertyValue, propertyElement) {
|
|
65682
65681
|
let primitiveType;
|
|
65683
65682
|
if (propertyClass.isEnumeration()) {
|
|
65684
|
-
const enumeration = await propertyClass.enumeration;
|
|
65683
|
+
const enumeration = await (propertyClass).enumeration;
|
|
65685
65684
|
if (!enumeration)
|
|
65686
65685
|
throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_1__.ECSchemaStatus.ClassNotFound, `The enumeration on property class '${propertyClass.fullName}' could not be found in the current schema context.`);
|
|
65687
65686
|
if (enumeration.type === undefined)
|
|
@@ -68135,7 +68134,7 @@ class IncrementalSchemaLocater {
|
|
|
68135
68134
|
* @returns The SchemaProps object.
|
|
68136
68135
|
*/
|
|
68137
68136
|
async createSchemaProps(schemaKey, schemaContext) {
|
|
68138
|
-
const schemaInfo = await schemaContext.getSchemaInfo(schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaMatchType.Latest);
|
|
68137
|
+
const schemaInfo = await schemaContext.getSchemaInfo(schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaMatchType.Latest); // eslint-disable-line @typescript-eslint/no-unnecessary-type-assertion
|
|
68139
68138
|
if (!schemaInfo)
|
|
68140
68139
|
throw new Error(`Schema ${schemaKey.name} could not be found.`);
|
|
68141
68140
|
const schemaReferences = [];
|
|
@@ -92993,41 +92992,77 @@ var PerModelCategoryVisibility;
|
|
|
92993
92992
|
}
|
|
92994
92993
|
PerModelCategoryVisibility.createOverrides = createOverrides;
|
|
92995
92994
|
})(PerModelCategoryVisibility || (PerModelCategoryVisibility = {}));
|
|
92996
|
-
class PerModelCategoryVisibilityOverride {
|
|
92997
|
-
modelId;
|
|
92998
|
-
categoryId;
|
|
92999
|
-
visible;
|
|
93000
|
-
constructor(modelId, categoryId, visible) {
|
|
93001
|
-
this.modelId = modelId;
|
|
93002
|
-
this.categoryId = categoryId;
|
|
93003
|
-
this.visible = visible;
|
|
93004
|
-
}
|
|
93005
|
-
reset(modelId, categoryId, visible) {
|
|
93006
|
-
this.modelId = modelId;
|
|
93007
|
-
this.categoryId = categoryId;
|
|
93008
|
-
this.visible = visible;
|
|
93009
|
-
}
|
|
93010
|
-
}
|
|
93011
|
-
function compareCategoryOverrides(lhs, rhs) {
|
|
93012
|
-
const cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(lhs.modelId, rhs.modelId);
|
|
93013
|
-
return 0 === cmp ? (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(lhs.categoryId, rhs.categoryId) : cmp;
|
|
93014
|
-
}
|
|
93015
92995
|
/** The Viewport-specific implementation of PerModelCategoryVisibility.Overrides. */
|
|
93016
|
-
class PerModelCategoryVisibilityOverrides
|
|
93017
|
-
|
|
92996
|
+
class PerModelCategoryVisibilityOverrides {
|
|
92997
|
+
_map = new Map();
|
|
92998
|
+
/** Flat set of all override entries, providing O(1) iteration via [Symbol.iterator]. Kept in sync with `_map`. */
|
|
92999
|
+
_set = new Set();
|
|
93018
93000
|
_vp;
|
|
93019
93001
|
constructor(vp) {
|
|
93020
|
-
super(compareCategoryOverrides);
|
|
93021
93002
|
this._vp = vp;
|
|
93022
93003
|
}
|
|
93004
|
+
[Symbol.iterator]() {
|
|
93005
|
+
return this._set[Symbol.iterator]();
|
|
93006
|
+
}
|
|
93023
93007
|
getOverride(modelId, categoryId) {
|
|
93024
|
-
this.
|
|
93025
|
-
const ovr = this.findEqual(this._scratch);
|
|
93008
|
+
const ovr = this._map.get(modelId)?.get(categoryId);
|
|
93026
93009
|
if (undefined !== ovr)
|
|
93027
93010
|
return ovr.visible ? PerModelCategoryVisibility.Override.Show : PerModelCategoryVisibility.Override.Hide;
|
|
93028
93011
|
else
|
|
93029
93012
|
return PerModelCategoryVisibility.Override.None;
|
|
93030
93013
|
}
|
|
93014
|
+
getModelEntry({ modelId, override }) {
|
|
93015
|
+
let modelEntry = this._map.get(modelId);
|
|
93016
|
+
if (modelEntry) {
|
|
93017
|
+
return modelEntry;
|
|
93018
|
+
}
|
|
93019
|
+
if (override === PerModelCategoryVisibility.Override.None) {
|
|
93020
|
+
return undefined;
|
|
93021
|
+
}
|
|
93022
|
+
modelEntry = new Map();
|
|
93023
|
+
this._map.set(modelId, modelEntry);
|
|
93024
|
+
return modelEntry;
|
|
93025
|
+
}
|
|
93026
|
+
addOrRemoveOverrideEntry({ modelEntry, categoryId, modelId, override }) {
|
|
93027
|
+
const overrideEntry = modelEntry.get(categoryId);
|
|
93028
|
+
if (override === PerModelCategoryVisibility.Override.None) {
|
|
93029
|
+
if (overrideEntry === undefined) {
|
|
93030
|
+
return false;
|
|
93031
|
+
}
|
|
93032
|
+
this._set.delete(overrideEntry);
|
|
93033
|
+
modelEntry.delete(categoryId);
|
|
93034
|
+
return true;
|
|
93035
|
+
}
|
|
93036
|
+
const visible = override === PerModelCategoryVisibility.Override.Show;
|
|
93037
|
+
if (overrideEntry === undefined) {
|
|
93038
|
+
const ovr = { modelId, categoryId, visible };
|
|
93039
|
+
modelEntry.set(categoryId, ovr);
|
|
93040
|
+
this._set.add(ovr);
|
|
93041
|
+
return true;
|
|
93042
|
+
}
|
|
93043
|
+
if (overrideEntry.visible !== visible) {
|
|
93044
|
+
overrideEntry.visible = visible;
|
|
93045
|
+
return true;
|
|
93046
|
+
}
|
|
93047
|
+
return false;
|
|
93048
|
+
}
|
|
93049
|
+
applyOverride(modelId, categoryIds, override, catIdsToLoad) {
|
|
93050
|
+
const modelEntry = this.getModelEntry({ modelId, override });
|
|
93051
|
+
let changed = false;
|
|
93052
|
+
if (!modelEntry)
|
|
93053
|
+
return changed;
|
|
93054
|
+
for (const categoryId of categoryIds) {
|
|
93055
|
+
if (this.addOrRemoveOverrideEntry({ modelEntry, categoryId, modelId, override })) {
|
|
93056
|
+
changed = true;
|
|
93057
|
+
if (catIdsToLoad && override !== PerModelCategoryVisibility.Override.None)
|
|
93058
|
+
catIdsToLoad.push(categoryId);
|
|
93059
|
+
}
|
|
93060
|
+
}
|
|
93061
|
+
if (modelEntry.size === 0) {
|
|
93062
|
+
this._map.delete(modelId);
|
|
93063
|
+
}
|
|
93064
|
+
return changed;
|
|
93065
|
+
}
|
|
93031
93066
|
/**
|
|
93032
93067
|
* set the overrides for multiple perModelCategoryVisibility props, loading categoryIds from the iModel if necessary.
|
|
93033
93068
|
* @see [[PerModelCategoryVisibility]]
|
|
@@ -93042,19 +93077,11 @@ class PerModelCategoryVisibilityOverrides extends _itwin_core_bentley__WEBPACK_I
|
|
|
93042
93077
|
const catIdsToLoad = [];
|
|
93043
93078
|
const iModelToUse = iModel ? iModel : this._vp.iModel;
|
|
93044
93079
|
for (const override of perModelCategoryVisibility) {
|
|
93045
|
-
const modelId = override.modelId;
|
|
93046
93080
|
// The caller may pass a single categoryId as a string, if we don't convert this to an array we will iterate
|
|
93047
93081
|
// over each individual character of that string, which is not the desired behavior.
|
|
93048
93082
|
const categoryIds = typeof override.categoryIds === "string" ? [override.categoryIds] : override.categoryIds;
|
|
93049
|
-
|
|
93050
|
-
|
|
93051
|
-
if (this.findAndUpdateOverrideInArray(modelId, categoryId, visOverride)) {
|
|
93052
|
-
anyChanged = true;
|
|
93053
|
-
if (PerModelCategoryVisibility.Override.None !== visOverride) {
|
|
93054
|
-
catIdsToLoad.push(categoryId);
|
|
93055
|
-
}
|
|
93056
|
-
}
|
|
93057
|
-
}
|
|
93083
|
+
if (this.applyOverride(override.modelId, categoryIds, override.visOverride, catIdsToLoad))
|
|
93084
|
+
anyChanged = true;
|
|
93058
93085
|
}
|
|
93059
93086
|
if (anyChanged) {
|
|
93060
93087
|
this._vp.setViewedCategoriesPerModelChanged();
|
|
@@ -93062,44 +93089,17 @@ class PerModelCategoryVisibilityOverrides extends _itwin_core_bentley__WEBPACK_I
|
|
|
93062
93089
|
this._vp.subcategories.push(iModelToUse.subcategories, catIdsToLoad, () => this._vp.setViewedCategoriesPerModelChanged());
|
|
93063
93090
|
}
|
|
93064
93091
|
}
|
|
93065
|
-
return;
|
|
93066
|
-
}
|
|
93067
|
-
/** Find and update the override in the array of overrides. If override not found, adds it to the array.
|
|
93068
|
-
* If the array was changed, returns true. */
|
|
93069
|
-
findAndUpdateOverrideInArray(modelId, categoryId, override) {
|
|
93070
|
-
const ovr = this._scratch;
|
|
93071
|
-
ovr.reset(modelId, categoryId, false);
|
|
93072
|
-
let changed = false;
|
|
93073
|
-
const index = this.indexOf(ovr);
|
|
93074
|
-
if (-1 === index) {
|
|
93075
|
-
if (PerModelCategoryVisibility.Override.None !== override) {
|
|
93076
|
-
this.insert(new PerModelCategoryVisibilityOverride(modelId, categoryId, PerModelCategoryVisibility.Override.Show === override));
|
|
93077
|
-
changed = true;
|
|
93078
|
-
}
|
|
93079
|
-
}
|
|
93080
|
-
else {
|
|
93081
|
-
if (PerModelCategoryVisibility.Override.None === override) {
|
|
93082
|
-
this._array.splice(index, 1);
|
|
93083
|
-
changed = true;
|
|
93084
|
-
}
|
|
93085
|
-
else if (this._array[index].visible !== (PerModelCategoryVisibility.Override.Show === override)) {
|
|
93086
|
-
this._array[index].visible = (PerModelCategoryVisibility.Override.Show === override);
|
|
93087
|
-
changed = true;
|
|
93088
|
-
}
|
|
93089
|
-
}
|
|
93090
|
-
return changed;
|
|
93091
93092
|
}
|
|
93092
93093
|
setOverride(modelIds, categoryIds, override) {
|
|
93094
|
+
const categoryIdIterable = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.iterable(categoryIds);
|
|
93093
93095
|
let changed = false;
|
|
93094
93096
|
for (const modelId of _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.iterable(modelIds)) {
|
|
93095
|
-
|
|
93096
|
-
|
|
93097
|
-
changed = true;
|
|
93098
|
-
}
|
|
93097
|
+
if (this.applyOverride(modelId, categoryIdIterable, override))
|
|
93098
|
+
changed = true;
|
|
93099
93099
|
}
|
|
93100
93100
|
if (changed) {
|
|
93101
93101
|
this._vp.setViewedCategoriesPerModelChanged();
|
|
93102
|
-
if (PerModelCategoryVisibility.Override.None
|
|
93102
|
+
if (override !== PerModelCategoryVisibility.Override.None) {
|
|
93103
93103
|
// Ensure subcategories loaded.
|
|
93104
93104
|
this._vp.subcategories.push(this._vp.iModel.subcategories, categoryIds, () => this._vp.setViewedCategoriesPerModelChanged());
|
|
93105
93105
|
}
|
|
@@ -93107,30 +93107,32 @@ class PerModelCategoryVisibilityOverrides extends _itwin_core_bentley__WEBPACK_I
|
|
|
93107
93107
|
}
|
|
93108
93108
|
clearOverrides(modelIds) {
|
|
93109
93109
|
if (undefined === modelIds) {
|
|
93110
|
-
if (
|
|
93111
|
-
this.clear();
|
|
93110
|
+
if (this._map.size > 0) {
|
|
93111
|
+
this._map.clear();
|
|
93112
|
+
this._set.clear();
|
|
93112
93113
|
this._vp.setViewedCategoriesPerModelChanged();
|
|
93113
93114
|
}
|
|
93114
93115
|
return;
|
|
93115
93116
|
}
|
|
93116
|
-
|
|
93117
|
-
|
|
93118
|
-
|
|
93119
|
-
|
|
93120
|
-
|
|
93121
|
-
this._array.splice(i, 1);
|
|
93122
|
-
this._vp.setViewedCategoriesPerModelChanged();
|
|
93123
|
-
removed = true;
|
|
93124
|
-
break;
|
|
93125
|
-
}
|
|
93117
|
+
let changed = false;
|
|
93118
|
+
for (const modelId of _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.iterable(modelIds)) {
|
|
93119
|
+
const modelEntry = this._map.get(modelId);
|
|
93120
|
+
if (!modelEntry) {
|
|
93121
|
+
continue;
|
|
93126
93122
|
}
|
|
93127
|
-
|
|
93128
|
-
|
|
93123
|
+
changed = true;
|
|
93124
|
+
for (const overrideEntry of modelEntry.values()) {
|
|
93125
|
+
this._set.delete(overrideEntry);
|
|
93126
|
+
}
|
|
93127
|
+
this._map.delete(modelId);
|
|
93128
|
+
}
|
|
93129
|
+
if (changed) {
|
|
93130
|
+
this._vp.setViewedCategoriesPerModelChanged();
|
|
93129
93131
|
}
|
|
93130
93132
|
}
|
|
93131
93133
|
addOverrides(fs, ovrs) {
|
|
93132
93134
|
const cache = this._vp.iModel.subcategories;
|
|
93133
|
-
for (const ovr of this.
|
|
93135
|
+
for (const ovr of this._set) {
|
|
93134
93136
|
const subcats = cache.getSubCategories(ovr.categoryId);
|
|
93135
93137
|
if (undefined === subcats)
|
|
93136
93138
|
continue;
|
|
@@ -93140,7 +93142,6 @@ class PerModelCategoryVisibilityOverrides extends _itwin_core_bentley__WEBPACK_I
|
|
|
93140
93142
|
/* if (!this._vp.view.viewsModel(ovr.modelId))
|
|
93141
93143
|
continue; */
|
|
93142
93144
|
// ###TODO: Avoid recomputing upper and lower portions of modelId if modelId repeated.
|
|
93143
|
-
// (Array is sorted first by modelId).
|
|
93144
93145
|
// Also avoid computing if no effective overrides.
|
|
93145
93146
|
const modelLo = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getLowerUint32(ovr.modelId);
|
|
93146
93147
|
const modelHi = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getUpperUint32(ovr.modelId);
|
|
@@ -211734,7 +211735,9 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
211734
211735
|
}
|
|
211735
211736
|
/** Create a new `Loop` with no children */
|
|
211736
211737
|
cloneEmptyPeer() {
|
|
211737
|
-
|
|
211738
|
+
const emptyClone = new Loop();
|
|
211739
|
+
emptyClone.isInner = this.isInner;
|
|
211740
|
+
return emptyClone;
|
|
211738
211741
|
}
|
|
211739
211742
|
/** Second step of double dispatch: call `handler.handleLoop(this)` */
|
|
211740
211743
|
dispatchToGeometryHandler(handler) {
|
|
@@ -217569,25 +217572,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
217569
217572
|
/* harmony export */ CurveCurveCloseApproachXY: () => (/* binding */ CurveCurveCloseApproachXY)
|
|
217570
217573
|
/* harmony export */ });
|
|
217571
217574
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
217572
|
-
/* harmony import */ var
|
|
217575
|
+
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
217573
217576
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
217574
217577
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
217575
217578
|
/* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
|
|
217576
217579
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
217577
|
-
/* harmony import */ var
|
|
217580
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
217578
217581
|
/* harmony import */ var _numerics_Newton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../numerics/Newton */ "../../core/geometry/lib/esm/numerics/Newton.js");
|
|
217579
217582
|
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
217580
217583
|
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
217581
217584
|
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
217582
|
-
/* harmony import */ var
|
|
217583
|
-
/* harmony import */ var
|
|
217584
|
-
/* harmony import */ var
|
|
217585
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
217586
|
+
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
217587
|
+
/* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
|
|
217585
217588
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
217586
217589
|
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
217587
|
-
/* harmony import */ var
|
|
217588
|
-
/* harmony import */ var
|
|
217590
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
217591
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
217589
217592
|
/* harmony import */ var _ProxyCurve__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ProxyCurve */ "../../core/geometry/lib/esm/curve/ProxyCurve.js");
|
|
217590
|
-
/* harmony import */ var
|
|
217593
|
+
/* harmony import */ var _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../spiral/TransitionSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/TransitionSpiral3d.js");
|
|
217591
217594
|
/*---------------------------------------------------------------------------------------------
|
|
217592
217595
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
217593
217596
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -218021,32 +218024,6 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
218021
218024
|
// 2) perpendicular line between 2 arcs (includes intersections)
|
|
218022
218025
|
this.allPerpendicularsArcArcBounded(cpA, cpB, reversed);
|
|
218023
218026
|
}
|
|
218024
|
-
/** Low level dispatch of arc with (beziers of) a bspline curve */
|
|
218025
|
-
dispatchArcBsplineCurve3d(cpA, cpB, reversed) {
|
|
218026
|
-
const ls = _LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d.create();
|
|
218027
|
-
cpB.emitStrokes(ls);
|
|
218028
|
-
this.computeArcLineString(cpA, ls, reversed);
|
|
218029
|
-
}
|
|
218030
|
-
/** Low level dispatch of (beziers of) a bspline curve with (beziers of) a bspline curve */
|
|
218031
|
-
dispatchBSplineCurve3dBSplineCurve3d(bcurveA, bcurveB, reversed) {
|
|
218032
|
-
const lsA = _LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d.create();
|
|
218033
|
-
bcurveA.emitStrokes(lsA);
|
|
218034
|
-
const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d.create();
|
|
218035
|
-
bcurveB.emitStrokes(lsB);
|
|
218036
|
-
this.computeLineStringLineString(lsA, lsB, reversed);
|
|
218037
|
-
}
|
|
218038
|
-
/** Low level dispatch of linestring with (beziers of) a bspline curve */
|
|
218039
|
-
dispatchLineStringBSplineCurve(lsA, curveB, reversed) {
|
|
218040
|
-
const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d.create();
|
|
218041
|
-
curveB.emitStrokes(lsB);
|
|
218042
|
-
this.computeLineStringLineString(lsA, lsB, reversed);
|
|
218043
|
-
}
|
|
218044
|
-
/** Low level dispatch of segment with (beziers of) a bspline curve */
|
|
218045
|
-
dispatchSegmentBsplineCurve(segA, curveB, reversed) {
|
|
218046
|
-
const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d.create();
|
|
218047
|
-
curveB.emitStrokes(lsB);
|
|
218048
|
-
this.computeSegmentLineString(segA, lsB, reversed);
|
|
218049
|
-
}
|
|
218050
218027
|
/** Detail computation for segment approaching linestring. */
|
|
218051
218028
|
computeSegmentLineString(segA, lsB, reversed) {
|
|
218052
218029
|
const numB = lsB.numPoints();
|
|
@@ -218074,7 +218051,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
218074
218051
|
const v0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
218075
218052
|
const v1 = CurveCurveCloseApproachXY._workPointBB1;
|
|
218076
218053
|
// 1. record intersections
|
|
218077
|
-
const intersections =
|
|
218054
|
+
const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_11__.CurveCurve.intersectionXYPairs(arcA, false, lsB, false, this._xyTolerance);
|
|
218078
218055
|
for (const intersection of intersections)
|
|
218079
218056
|
this.testAndRecordPair(intersection, reversed);
|
|
218080
218057
|
// 2. record linestring interior vertex projections onto arc
|
|
@@ -218132,7 +218109,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
218132
218109
|
return;
|
|
218133
218110
|
let bitB0;
|
|
218134
218111
|
let bitB1;
|
|
218135
|
-
const rangeA1 =
|
|
218112
|
+
const rangeA1 = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__.Range3d.createNull();
|
|
218136
218113
|
const pointA0 = CurveCurveCloseApproachXY._workPointAA0;
|
|
218137
218114
|
const pointA1 = CurveCurveCloseApproachXY._workPointAA1;
|
|
218138
218115
|
const pointB0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
@@ -218174,7 +218151,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
218174
218151
|
/** Low level dispatch of curve collection. */
|
|
218175
218152
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
218176
218153
|
const geomB = this._geometryB; // save
|
|
218177
|
-
if (!geomB || !geomB.children || !(geomB instanceof
|
|
218154
|
+
if (!geomB || !geomB.children || !(geomB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_13__.CurveCollection))
|
|
218178
218155
|
return;
|
|
218179
218156
|
for (const child of geomB.children) {
|
|
218180
218157
|
this.resetGeometry(child);
|
|
@@ -218184,9 +218161,9 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
218184
218161
|
}
|
|
218185
218162
|
/** Low level dispatch to geomA given a CurveChainWithDistanceIndex in geometryB. */
|
|
218186
218163
|
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
218187
|
-
if (!this._geometryB || !(this._geometryB instanceof
|
|
218164
|
+
if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex))
|
|
218188
218165
|
return;
|
|
218189
|
-
if (geomA instanceof
|
|
218166
|
+
if (geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex)
|
|
218190
218167
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
218191
218168
|
const saveResults = this.grabPairedResults();
|
|
218192
218169
|
const geomB = this._geometryB;
|
|
@@ -218197,133 +218174,36 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
218197
218174
|
this.resetGeometry(geomB);
|
|
218198
218175
|
const childResults = this._results.extractArray();
|
|
218199
218176
|
childResults.forEach((pair) => {
|
|
218200
|
-
|
|
218177
|
+
_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex.convertChildDetailToChainDetailSingle(pair, undefined, geomB);
|
|
218201
218178
|
this._results.insert(pair);
|
|
218202
218179
|
});
|
|
218203
218180
|
saveResults.forEach((pair) => this._results.insert(pair));
|
|
218204
218181
|
}
|
|
218205
|
-
/**
|
|
218206
|
-
|
|
218207
|
-
|
|
218208
|
-
const segmentB = this._geometryB;
|
|
218209
|
-
this.computeSegmentSegment(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, segmentB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, false);
|
|
218210
|
-
}
|
|
218211
|
-
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
|
|
218212
|
-
this.computeSegmentLineString(segmentA, this._geometryB, false);
|
|
218213
|
-
}
|
|
218214
|
-
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_6__.Arc3d) {
|
|
218215
|
-
this.computeSegmentArc(segmentA, this._geometryB, false);
|
|
218216
|
-
}
|
|
218217
|
-
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_17__.BSplineCurve3d) {
|
|
218218
|
-
this.dispatchSegmentBsplineCurve(segmentA, this._geometryB, false);
|
|
218219
|
-
}
|
|
218220
|
-
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_18__.TransitionSpiral3d) {
|
|
218221
|
-
this.dispatchCurveSpiral(segmentA, this._geometryB, false);
|
|
218222
|
-
}
|
|
218223
|
-
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
218224
|
-
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
218225
|
-
}
|
|
218226
|
-
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex) {
|
|
218227
|
-
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
218228
|
-
}
|
|
218229
|
-
return undefined;
|
|
218230
|
-
}
|
|
218231
|
-
/** Double dispatch handler for strongly typed linestring. */
|
|
218232
|
-
handleLineString3d(lsA) {
|
|
218233
|
-
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__.LineSegment3d) {
|
|
218234
|
-
this.computeSegmentLineString(this._geometryB, lsA, true);
|
|
218235
|
-
}
|
|
218236
|
-
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
|
|
218237
|
-
this.computeLineStringLineString(lsA, this._geometryB, false);
|
|
218238
|
-
}
|
|
218239
|
-
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_6__.Arc3d) {
|
|
218240
|
-
this.computeArcLineString(this._geometryB, lsA, true);
|
|
218241
|
-
}
|
|
218242
|
-
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_17__.BSplineCurve3d) {
|
|
218243
|
-
this.dispatchLineStringBSplineCurve(lsA, this._geometryB, false);
|
|
218244
|
-
}
|
|
218245
|
-
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_18__.TransitionSpiral3d) {
|
|
218246
|
-
this.dispatchCurveSpiral(lsA, this._geometryB, false);
|
|
218247
|
-
}
|
|
218248
|
-
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
218249
|
-
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
218250
|
-
}
|
|
218251
|
-
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex) {
|
|
218252
|
-
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
218253
|
-
}
|
|
218254
|
-
return undefined;
|
|
218255
|
-
}
|
|
218256
|
-
/** Double dispatch handler for strongly typed arc. */
|
|
218257
|
-
handleArc3d(arcA) {
|
|
218258
|
-
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__.LineSegment3d) {
|
|
218259
|
-
this.computeSegmentArc(this._geometryB, arcA, true);
|
|
218260
|
-
}
|
|
218261
|
-
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
|
|
218262
|
-
this.computeArcLineString(arcA, this._geometryB, false);
|
|
218263
|
-
}
|
|
218264
|
-
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_6__.Arc3d) {
|
|
218265
|
-
this.dispatchArcArc(arcA, this._geometryB, false);
|
|
218266
|
-
}
|
|
218267
|
-
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_17__.BSplineCurve3d) {
|
|
218268
|
-
this.dispatchArcBsplineCurve3d(arcA, this._geometryB, false);
|
|
218269
|
-
}
|
|
218270
|
-
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_18__.TransitionSpiral3d) {
|
|
218271
|
-
this.dispatchCurveSpiral(arcA, this._geometryB, false);
|
|
218272
|
-
}
|
|
218273
|
-
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
218274
|
-
this.dispatchCurveCollection(arcA, this.handleArc3d.bind(this));
|
|
218275
|
-
}
|
|
218276
|
-
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex) {
|
|
218277
|
-
this.dispatchCurveChainWithDistanceIndex(arcA, this.handleArc3d.bind(this));
|
|
218278
|
-
}
|
|
218279
|
-
return undefined;
|
|
218280
|
-
}
|
|
218281
|
-
/** Double dispatch handler for strongly typed bspline curve. */
|
|
218282
|
-
handleBSplineCurve3d(curveA) {
|
|
218283
|
-
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__.LineSegment3d) {
|
|
218284
|
-
this.dispatchSegmentBsplineCurve(this._geometryB, curveA, true);
|
|
218285
|
-
}
|
|
218286
|
-
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
|
|
218287
|
-
this.dispatchLineStringBSplineCurve(this._geometryB, curveA, true);
|
|
218288
|
-
}
|
|
218289
|
-
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_6__.Arc3d) {
|
|
218290
|
-
this.dispatchArcBsplineCurve3d(this._geometryB, curveA, true);
|
|
218291
|
-
}
|
|
218292
|
-
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_17__.BSplineCurve3dBase) {
|
|
218293
|
-
this.dispatchBSplineCurve3dBSplineCurve3d(curveA, this._geometryB, false);
|
|
218294
|
-
}
|
|
218295
|
-
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_18__.TransitionSpiral3d) {
|
|
218296
|
-
this.dispatchCurveSpiral(curveA, this._geometryB, false);
|
|
218297
|
-
}
|
|
218298
|
-
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
218299
|
-
this.dispatchCurveCollection(curveA, this.handleBSplineCurve3d.bind(this));
|
|
218300
|
-
}
|
|
218301
|
-
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_15__.CurveChainWithDistanceIndex) {
|
|
218302
|
-
this.dispatchCurveChainWithDistanceIndex(curveA, this.handleBSplineCurve3d.bind(this));
|
|
218303
|
-
}
|
|
218304
|
-
return undefined;
|
|
218182
|
+
/** Specifies whether the curve needs to be stroked for close approach computation. */
|
|
218183
|
+
needsStroking(curve) {
|
|
218184
|
+
return curve instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_15__.BSplineCurve3dBase || curve instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_16__.TransitionSpiral3d;
|
|
218305
218185
|
}
|
|
218306
218186
|
/**
|
|
218307
|
-
* Process seeds for xy close approach between
|
|
218187
|
+
* Process seeds for xy close approach between one curve and another curve to be stroked.
|
|
218308
218188
|
* * Refine each result via Newton iteration. If it doesn't converge, remove it.
|
|
218309
|
-
* @param seeds
|
|
218310
|
-
* @param curveA
|
|
218311
|
-
* @param
|
|
218312
|
-
* @param reversed whether `
|
|
218189
|
+
* @param seeds the initial seed results to refine.
|
|
218190
|
+
* @param curveA curve to find its XY close approach with curveB.
|
|
218191
|
+
* @param curveB the other curve to be stroked.
|
|
218192
|
+
* @param reversed whether `curveB` data is in `detailA` of each recorded pair, and `curveA` data in `detailB`.
|
|
218313
218193
|
*/
|
|
218314
|
-
|
|
218315
|
-
const xyMatchingFunction = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_10__.CurveCurveCloseApproachXYRRtoRRD(curveA,
|
|
218194
|
+
refineStrokedResultsByNewton(seeds, curveA, curveB, reversed = false) {
|
|
218195
|
+
const xyMatchingFunction = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_10__.CurveCurveCloseApproachXYRRtoRRD(curveA, curveB);
|
|
218316
218196
|
const newtonSearcher = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_10__.Newton2dUnboundedWithDerivative(xyMatchingFunction, 50, this._newtonTolerance); // seen: 47
|
|
218317
218197
|
for (const seed of seeds) {
|
|
218318
218198
|
const detailA = reversed ? seed.detailB : seed.detailA;
|
|
218319
218199
|
const detailB = reversed ? seed.detailA : seed.detailB;
|
|
218320
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(detailB.curve instanceof
|
|
218321
|
-
newtonSearcher.setUV(detailA.fraction, detailB.fraction); // use linestring fraction as
|
|
218200
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(detailB.curve instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d, "Caller has discretized the curve");
|
|
218201
|
+
newtonSearcher.setUV(detailA.fraction, detailB.fraction); // use the linestring fraction as initial curveB fraction (ASSUME it's close enough)
|
|
218322
218202
|
if (newtonSearcher.runIterations()) {
|
|
218323
218203
|
const fractionA = newtonSearcher.getU();
|
|
218324
218204
|
const fractionB = newtonSearcher.getV();
|
|
218325
218205
|
if (this.acceptFraction(fractionA) && this.acceptFraction(fractionB))
|
|
218326
|
-
this.testAndRecordPointPair(curveA, fractionA, undefined,
|
|
218206
|
+
this.testAndRecordPointPair(curveA, fractionA, undefined, curveB, fractionB, undefined, reversed);
|
|
218327
218207
|
} // ignore failure to converge
|
|
218328
218208
|
}
|
|
218329
218209
|
}
|
|
@@ -218335,7 +218215,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
218335
218215
|
* @param result object to receive appended stroke points; if omitted, a new object is created, populated, and returned.
|
|
218336
218216
|
*/
|
|
218337
218217
|
strokeCurve(curve, options, result) {
|
|
218338
|
-
const ls = result ? result :
|
|
218218
|
+
const ls = result ? result : _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d.create();
|
|
218339
218219
|
curve.emitStrokes(ls, options);
|
|
218340
218220
|
return ls;
|
|
218341
218221
|
}
|
|
@@ -218359,40 +218239,120 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
218359
218239
|
return discreteResults;
|
|
218360
218240
|
}
|
|
218361
218241
|
/**
|
|
218362
|
-
* Compute the XY close approach of a curve and
|
|
218363
|
-
* @param curveA curve to find its close approach with
|
|
218364
|
-
* @param
|
|
218365
|
-
* @param reversed whether `
|
|
218242
|
+
* Compute the XY close approach of a curve and another curve to be stroked.
|
|
218243
|
+
* @param curveA curve to find its XY close approach with curveB.
|
|
218244
|
+
* @param curveB the other curve to be stroked.
|
|
218245
|
+
* @param reversed whether `curveB` data will be recorded in `detailA` of each result, and `curveA` data in `detailB`.
|
|
218366
218246
|
*/
|
|
218367
|
-
|
|
218247
|
+
dispatchCurveStrokedCurve(curveA, curveB, reversed) {
|
|
218368
218248
|
// explicit search for intersections (Newton converges too slowly on DirectSpiral3d tangent intersections)
|
|
218369
|
-
const intersections =
|
|
218249
|
+
const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_11__.CurveCurve.intersectionXYPairs(curveA, false, curveB, false, this._xyTolerance);
|
|
218370
218250
|
for (const intersection of intersections)
|
|
218371
218251
|
this.testAndRecordPair(intersection, reversed);
|
|
218372
218252
|
// append seeds computed by solving the discretized spiral close approach problem, then refine the seeds via Newton
|
|
218373
218253
|
let cpA = curveA;
|
|
218374
|
-
if (curveA
|
|
218254
|
+
if (this.needsStroking(curveA))
|
|
218375
218255
|
cpA = this.strokeCurve(curveA);
|
|
218376
|
-
const cpB = this.strokeCurve(
|
|
218256
|
+
const cpB = this.strokeCurve(curveB);
|
|
218377
218257
|
const seeds = this.computeDiscreteCloseApproachResults(cpA, cpB, reversed);
|
|
218378
|
-
this.
|
|
218379
|
-
if (curveA instanceof
|
|
218258
|
+
this.refineStrokedResultsByNewton(seeds, curveA, curveB, reversed);
|
|
218259
|
+
if (curveA instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d) { // explicitly test corners (where Newton converges too slowly)
|
|
218380
218260
|
const fStep = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.safeDivideFraction(1.0, curveA.numEdges(), 0);
|
|
218381
218261
|
const v0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
218382
218262
|
for (let i = 1; i < curveA.numEdges(); ++i)
|
|
218383
|
-
this.testAndRecordProjection(curveA, i * fStep, curveA.pointAtUnchecked(i, v0),
|
|
218263
|
+
this.testAndRecordProjection(curveA, i * fStep, curveA.pointAtUnchecked(i, v0), curveB, reversed);
|
|
218264
|
+
}
|
|
218265
|
+
this.testAndRecordEndPointApproaches(curveA, curveB, reversed);
|
|
218266
|
+
}
|
|
218267
|
+
/** Double dispatch handler for strongly typed segment. */
|
|
218268
|
+
handleLineSegment3d(segmentA) {
|
|
218269
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_18__.LineSegment3d) {
|
|
218270
|
+
const segmentB = this._geometryB;
|
|
218271
|
+
this.computeSegmentSegment(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, segmentB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, false);
|
|
218272
|
+
}
|
|
218273
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d) {
|
|
218274
|
+
this.computeSegmentLineString(segmentA, this._geometryB, false);
|
|
218275
|
+
}
|
|
218276
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_6__.Arc3d) {
|
|
218277
|
+
this.computeSegmentArc(segmentA, this._geometryB, false);
|
|
218278
|
+
}
|
|
218279
|
+
else if (this.needsStroking(this._geometryB)) {
|
|
218280
|
+
this.dispatchCurveStrokedCurve(segmentA, this._geometryB, false);
|
|
218281
|
+
}
|
|
218282
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_13__.CurveCollection) {
|
|
218283
|
+
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
218284
|
+
}
|
|
218285
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
218286
|
+
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
218287
|
+
}
|
|
218288
|
+
return undefined;
|
|
218289
|
+
}
|
|
218290
|
+
/** Double dispatch handler for strongly typed linestring. */
|
|
218291
|
+
handleLineString3d(lsA) {
|
|
218292
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_18__.LineSegment3d) {
|
|
218293
|
+
this.computeSegmentLineString(this._geometryB, lsA, true);
|
|
218294
|
+
}
|
|
218295
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d) {
|
|
218296
|
+
this.computeLineStringLineString(lsA, this._geometryB, false);
|
|
218384
218297
|
}
|
|
218385
|
-
this.
|
|
218298
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_6__.Arc3d) {
|
|
218299
|
+
this.computeArcLineString(this._geometryB, lsA, true);
|
|
218300
|
+
}
|
|
218301
|
+
else if (this.needsStroking(this._geometryB)) {
|
|
218302
|
+
this.dispatchCurveStrokedCurve(lsA, this._geometryB, false);
|
|
218303
|
+
}
|
|
218304
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_13__.CurveCollection) {
|
|
218305
|
+
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
218306
|
+
}
|
|
218307
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
218308
|
+
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
218309
|
+
}
|
|
218310
|
+
return undefined;
|
|
218311
|
+
}
|
|
218312
|
+
/** Double dispatch handler for strongly typed arc. */
|
|
218313
|
+
handleArc3d(arcA) {
|
|
218314
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_18__.LineSegment3d) {
|
|
218315
|
+
this.computeSegmentArc(this._geometryB, arcA, true);
|
|
218316
|
+
}
|
|
218317
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_17__.LineString3d) {
|
|
218318
|
+
this.computeArcLineString(arcA, this._geometryB, false);
|
|
218319
|
+
}
|
|
218320
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_6__.Arc3d) {
|
|
218321
|
+
this.dispatchArcArc(arcA, this._geometryB, false);
|
|
218322
|
+
}
|
|
218323
|
+
else if (this.needsStroking(this._geometryB)) {
|
|
218324
|
+
this.dispatchCurveStrokedCurve(arcA, this._geometryB, false);
|
|
218325
|
+
}
|
|
218326
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_13__.CurveCollection) {
|
|
218327
|
+
this.dispatchCurveCollection(arcA, this.handleArc3d.bind(this));
|
|
218328
|
+
}
|
|
218329
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
218330
|
+
this.dispatchCurveChainWithDistanceIndex(arcA, this.handleArc3d.bind(this));
|
|
218331
|
+
}
|
|
218332
|
+
return undefined;
|
|
218333
|
+
}
|
|
218334
|
+
/** Double dispatch handler for strongly typed bspline curve. */
|
|
218335
|
+
handleBSplineCurve3d(curveA) {
|
|
218336
|
+
if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
218337
|
+
this.dispatchCurveChainWithDistanceIndex(curveA, this.handleBSplineCurve3d.bind(this));
|
|
218338
|
+
}
|
|
218339
|
+
else if (this._geometryB instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_19__.CurvePrimitive) {
|
|
218340
|
+
this.dispatchCurveStrokedCurve(this._geometryB, curveA, true);
|
|
218341
|
+
}
|
|
218342
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_13__.CurveCollection) {
|
|
218343
|
+
this.dispatchCurveCollection(curveA, this.handleBSplineCurve3d.bind(this));
|
|
218344
|
+
}
|
|
218345
|
+
return undefined;
|
|
218386
218346
|
}
|
|
218387
218347
|
/** Double dispatch handler for strongly typed spiral curve. */
|
|
218388
218348
|
handleTransitionSpiral(spiral) {
|
|
218389
|
-
if (this._geometryB instanceof
|
|
218349
|
+
if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
218390
218350
|
this.dispatchCurveChainWithDistanceIndex(spiral, this.handleTransitionSpiral.bind(this));
|
|
218391
218351
|
}
|
|
218392
218352
|
else if (this._geometryB instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_19__.CurvePrimitive) {
|
|
218393
|
-
this.
|
|
218353
|
+
this.dispatchCurveStrokedCurve(this._geometryB, spiral, true);
|
|
218394
218354
|
}
|
|
218395
|
-
else if (this._geometryB instanceof
|
|
218355
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_13__.CurveCollection) {
|
|
218396
218356
|
this.dispatchCurveCollection(spiral, this.handleTransitionSpiral.bind(this));
|
|
218397
218357
|
}
|
|
218398
218358
|
return undefined;
|
|
@@ -218403,25 +218363,13 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
218403
218363
|
// if _geometryB is also a CurveChainWithDistanceIndex, it will already have been converted by dispatchCurveChainWithDistanceIndex
|
|
218404
218364
|
const childResults = this._results.extractArray();
|
|
218405
218365
|
childResults.forEach((pair) => {
|
|
218406
|
-
|
|
218366
|
+
_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex.convertChildDetailToChainDetailSingle(pair, chain, undefined);
|
|
218407
218367
|
this._results.insert(pair);
|
|
218408
218368
|
});
|
|
218409
218369
|
}
|
|
218410
218370
|
/** Double dispatch handler for strongly typed homogeneous bspline curve .. */
|
|
218411
218371
|
handleBSplineCurve3dH(_curve) {
|
|
218412
|
-
|
|
218413
|
-
//NEEDS WORK -- make "dispatch" methods tolerant of both 3d and 3dH.
|
|
218414
|
-
// "easy" if both present BezierCurve3dH span loaders
|
|
218415
|
-
if (this._geometryB instanceof LineSegment3d) {
|
|
218416
|
-
this.dispatchSegmentBsplineCurve(
|
|
218417
|
-
this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB,
|
|
218418
|
-
curve, this._extendA, true);
|
|
218419
|
-
} else if (this._geometryB instanceof LineString3d) {
|
|
218420
|
-
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB, curve, this._extendA, true);
|
|
218421
|
-
} else if (this._geometryB instanceof Arc3d) {
|
|
218422
|
-
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB, curve, this._extendA, true);
|
|
218423
|
-
}
|
|
218424
|
-
*/
|
|
218372
|
+
// NEEDS WORK -- make "dispatch" methods tolerant of both 3d and 3dH
|
|
218425
218373
|
return undefined;
|
|
218426
218374
|
}
|
|
218427
218375
|
}
|
|
@@ -218441,7 +218389,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
218441
218389
|
/* harmony export */ CurveCurveIntersectXY: () => (/* binding */ CurveCurveIntersectXY)
|
|
218442
218390
|
/* harmony export */ });
|
|
218443
218391
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
218444
|
-
/* harmony import */ var
|
|
218392
|
+
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
218445
218393
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
218446
218394
|
/* harmony import */ var _geometry3d_CoincidentGeometryOps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/CoincidentGeometryOps */ "../../core/geometry/lib/esm/geometry3d/CoincidentGeometryOps.js");
|
|
218447
218395
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
@@ -218453,18 +218401,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
218453
218401
|
/* harmony import */ var _numerics_Newton__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../numerics/Newton */ "../../core/geometry/lib/esm/numerics/Newton.js");
|
|
218454
218402
|
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
218455
218403
|
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
218456
|
-
/* harmony import */ var
|
|
218404
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
218457
218405
|
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
218458
218406
|
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
218459
|
-
/* harmony import */ var
|
|
218407
|
+
/* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
|
|
218460
218408
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
218461
218409
|
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
218462
|
-
/* harmony import */ var
|
|
218463
|
-
/* harmony import */ var
|
|
218410
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
218411
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
218464
218412
|
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
218465
218413
|
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
218466
218414
|
/* harmony import */ var _ProxyCurve__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ProxyCurve */ "../../core/geometry/lib/esm/curve/ProxyCurve.js");
|
|
218467
|
-
/* harmony import */ var
|
|
218415
|
+
/* harmony import */ var _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../spiral/TransitionSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/TransitionSpiral3d.js");
|
|
218468
218416
|
/*---------------------------------------------------------------------------------------------
|
|
218469
218417
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
218470
218418
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -218619,7 +218567,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
218619
218567
|
* @param fractionB1 end of the subcurve of cpB
|
|
218620
218568
|
* @param reversed whether to reverse the details in the recorded intersection pair
|
|
218621
218569
|
* @param intervalDetails optional data for a coincident segment intersection
|
|
218622
|
-
* @param fractionTol relative tolerance for comparing fractions to avoid duplicating the last intersection. Defaults
|
|
218570
|
+
* @param fractionTol relative tolerance for comparing fractions to avoid duplicating the last intersection. Defaults
|
|
218571
|
+
* to [[Geometry.smallAngleRadians]].
|
|
218623
218572
|
*/
|
|
218624
218573
|
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed, intervalDetails, fractionTol) {
|
|
218625
218574
|
let globalFractionA, globalFractionB;
|
|
@@ -219046,9 +218995,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219046
218995
|
bezierA.fractionToPoint4d(f1, this._xyzwA1);
|
|
219047
218996
|
_geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_2__.Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);
|
|
219048
218997
|
bezierB.poleProductsXYZW(univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w);
|
|
219049
|
-
let errors = 0;
|
|
219050
218998
|
const roots = univariateBezierB.roots(0.0, true);
|
|
219051
218999
|
if (roots) {
|
|
219000
|
+
const strictTolerance = this._coincidentGeometryContext.tolerance * 0.0001;
|
|
219052
219001
|
for (const r of roots) {
|
|
219053
219002
|
let bezierBFraction = r;
|
|
219054
219003
|
bezierB.fractionToPoint4d(bezierBFraction, this._xyzwB);
|
|
@@ -219060,15 +219009,19 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219060
219009
|
const xyMatchingFunction = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_13__.CurveCurveIntersectionXYRRToRRD(bezierA, bezierB);
|
|
219061
219010
|
const newtonSearcher = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_13__.Newton2dUnboundedWithDerivative(xyMatchingFunction);
|
|
219062
219011
|
newtonSearcher.setUV(bezierAFraction, bezierBFraction);
|
|
219063
|
-
|
|
219064
|
-
|
|
219065
|
-
|
|
219066
|
-
}
|
|
219012
|
+
let converged = newtonSearcher.runIterations();
|
|
219013
|
+
bezierAFraction = newtonSearcher.getU();
|
|
219014
|
+
bezierBFraction = newtonSearcher.getV();
|
|
219067
219015
|
const bcurveAFraction = bezierA.fractionToParentFraction(bezierAFraction);
|
|
219068
219016
|
const bcurveBFraction = bezierB.fractionToParentFraction(bezierBFraction);
|
|
219069
|
-
if (false) {}
|
|
219070
219017
|
if (this.acceptFraction(false, bcurveAFraction, false) && this.acceptFraction(false, bcurveBFraction, false)) {
|
|
219071
|
-
|
|
219018
|
+
const pointA = bezierA.fractionToPoint(bezierAFraction, CurveCurveIntersectXY._workPointA0);
|
|
219019
|
+
const pointB = bezierB.fractionToPoint(bezierBFraction, CurveCurveIntersectXY._workPointB0);
|
|
219020
|
+
if (!converged) { // Newton may have found close points even if it didn't converge parametrically
|
|
219021
|
+
converged = pointA.isAlmostEqualXY(pointB, strictTolerance); // we can afford to be choosy
|
|
219022
|
+
}
|
|
219023
|
+
if (converged)
|
|
219024
|
+
this.recordPointWithLocalFractions(bcurveAFraction, bcurveA, 0, 1, bcurveBFraction, bcurveB, 0, 1, reversed);
|
|
219072
219025
|
}
|
|
219073
219026
|
}
|
|
219074
219027
|
}
|
|
@@ -219297,137 +219250,6 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219297
219250
|
this.resetGeometryB(geomB); // restore
|
|
219298
219251
|
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
219299
219252
|
}
|
|
219300
|
-
/**
|
|
219301
|
-
* Invoke dispatch on each child of `g` as "geometryA".
|
|
219302
|
-
* * If `g` is a `Path` or `Loop`, adjust extension flags for geometryA accordingly.
|
|
219303
|
-
*/
|
|
219304
|
-
handleChildren(g) {
|
|
219305
|
-
const children = g.children;
|
|
219306
|
-
if (!children)
|
|
219307
|
-
return;
|
|
219308
|
-
const saveExtendA0 = this._extendA0;
|
|
219309
|
-
const saveExtendA1 = this._extendA1;
|
|
219310
|
-
for (let i = 0; i < children.length; i++) {
|
|
219311
|
-
let extendA0 = saveExtendA0;
|
|
219312
|
-
let extendA1 = saveExtendA1;
|
|
219313
|
-
if (g instanceof _Path__WEBPACK_IMPORTED_MODULE_15__.Path && children.length > 1) {
|
|
219314
|
-
if (i === 0)
|
|
219315
|
-
extendA1 = false; // first child can only extend from start
|
|
219316
|
-
else if (i === children.length - 1)
|
|
219317
|
-
extendA0 = false; // last child can only extend from end
|
|
219318
|
-
else
|
|
219319
|
-
extendA0 = extendA1 = false; // middle children cannot extend
|
|
219320
|
-
}
|
|
219321
|
-
else if (g instanceof _Loop__WEBPACK_IMPORTED_MODULE_16__.Loop) {
|
|
219322
|
-
extendA0 = extendA1 = false; // Loops cannot extend
|
|
219323
|
-
}
|
|
219324
|
-
this.resetGeometryA(extendA0, extendA1);
|
|
219325
|
-
children[i].dispatchToGeometryHandler(this);
|
|
219326
|
-
}
|
|
219327
|
-
this.resetGeometryA(saveExtendA0, saveExtendA1);
|
|
219328
|
-
}
|
|
219329
|
-
/** Double dispatch handler for strongly typed segment. */
|
|
219330
|
-
handleLineSegment3d(segmentA) {
|
|
219331
|
-
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_18__.LineSegment3d) {
|
|
219332
|
-
const segmentB = this._geometryB;
|
|
219333
|
-
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);
|
|
219334
|
-
}
|
|
219335
|
-
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_19__.LineString3d) {
|
|
219336
|
-
this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219337
|
-
}
|
|
219338
|
-
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_20__.Arc3d) {
|
|
219339
|
-
this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219340
|
-
}
|
|
219341
|
-
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_21__.BSplineCurve3d) {
|
|
219342
|
-
this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219343
|
-
}
|
|
219344
|
-
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_22__.TransitionSpiral3d) {
|
|
219345
|
-
this.dispatchCurveSpiral(segmentA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
219346
|
-
}
|
|
219347
|
-
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
219348
|
-
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
219349
|
-
}
|
|
219350
|
-
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex) {
|
|
219351
|
-
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
219352
|
-
}
|
|
219353
|
-
return undefined;
|
|
219354
|
-
}
|
|
219355
|
-
/** Double dispatch handler for strongly typed linestring. */
|
|
219356
|
-
handleLineString3d(lsA) {
|
|
219357
|
-
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_19__.LineString3d) {
|
|
219358
|
-
const lsB = this._geometryB;
|
|
219359
|
-
this.computeLineStringLineString(lsA, this._extendA0, this._extendA1, lsB, this._extendB0, this._extendB1, false);
|
|
219360
|
-
}
|
|
219361
|
-
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_18__.LineSegment3d) {
|
|
219362
|
-
this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
219363
|
-
}
|
|
219364
|
-
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_20__.Arc3d) {
|
|
219365
|
-
this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
219366
|
-
}
|
|
219367
|
-
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_21__.BSplineCurve3d) {
|
|
219368
|
-
this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219369
|
-
}
|
|
219370
|
-
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_22__.TransitionSpiral3d) {
|
|
219371
|
-
this.dispatchCurveSpiral(lsA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
219372
|
-
}
|
|
219373
|
-
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
219374
|
-
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
219375
|
-
}
|
|
219376
|
-
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex) {
|
|
219377
|
-
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
219378
|
-
}
|
|
219379
|
-
return undefined;
|
|
219380
|
-
}
|
|
219381
|
-
/** Double dispatch handler for strongly typed arc. */
|
|
219382
|
-
handleArc3d(arcA) {
|
|
219383
|
-
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_18__.LineSegment3d) {
|
|
219384
|
-
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arcA, this._extendA0, this._extendA1, true);
|
|
219385
|
-
}
|
|
219386
|
-
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_19__.LineString3d) {
|
|
219387
|
-
this.computeArcLineString(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219388
|
-
}
|
|
219389
|
-
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_20__.Arc3d) {
|
|
219390
|
-
this.dispatchArcArc(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219391
|
-
}
|
|
219392
|
-
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_21__.BSplineCurve3d) {
|
|
219393
|
-
this.dispatchArcBsplineCurve3d(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219394
|
-
}
|
|
219395
|
-
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_22__.TransitionSpiral3d) {
|
|
219396
|
-
this.dispatchCurveSpiral(arcA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
219397
|
-
}
|
|
219398
|
-
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
219399
|
-
this.dispatchCurveCollection(arcA, this.handleArc3d.bind(this));
|
|
219400
|
-
}
|
|
219401
|
-
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex) {
|
|
219402
|
-
this.dispatchCurveChainWithDistanceIndex(arcA, this.handleArc3d.bind(this));
|
|
219403
|
-
}
|
|
219404
|
-
return undefined;
|
|
219405
|
-
}
|
|
219406
|
-
/** Double dispatch handler for strongly typed bspline curve. */
|
|
219407
|
-
handleBSplineCurve3d(curveA) {
|
|
219408
|
-
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_18__.LineSegment3d) {
|
|
219409
|
-
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
|
|
219410
|
-
}
|
|
219411
|
-
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_19__.LineString3d) {
|
|
219412
|
-
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
|
|
219413
|
-
}
|
|
219414
|
-
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_20__.Arc3d) {
|
|
219415
|
-
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
|
|
219416
|
-
}
|
|
219417
|
-
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_21__.BSplineCurve3dBase) {
|
|
219418
|
-
this.dispatchBSplineCurve3dBSplineCurve3d(curveA, this._geometryB, false);
|
|
219419
|
-
}
|
|
219420
|
-
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_22__.TransitionSpiral3d) {
|
|
219421
|
-
this.dispatchCurveSpiral(curveA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
219422
|
-
}
|
|
219423
|
-
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
219424
|
-
this.dispatchCurveCollection(curveA, this.handleBSplineCurve3d.bind(this));
|
|
219425
|
-
}
|
|
219426
|
-
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex) {
|
|
219427
|
-
this.dispatchCurveChainWithDistanceIndex(curveA, this.handleBSplineCurve3d.bind(this));
|
|
219428
|
-
}
|
|
219429
|
-
return undefined;
|
|
219430
|
-
}
|
|
219431
219253
|
/**
|
|
219432
219254
|
* Process tail of `this._results` for xy-intersections between the curve and spiral.
|
|
219433
219255
|
* * Refine each result via Newton iteration. If it doesn't converge, remove it.
|
|
@@ -219458,7 +219280,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219458
219280
|
const pair = this._results[i];
|
|
219459
219281
|
const detailA = reversed ? pair.detailB : pair.detailA;
|
|
219460
219282
|
const detailB = reversed ? pair.detailA : pair.detailB;
|
|
219461
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(detailB.curve instanceof
|
|
219283
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(detailB.curve instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d, "Caller has discretized the spiral");
|
|
219462
219284
|
const extendA0 = reversed ? this._extendB0 : this._extendA0;
|
|
219463
219285
|
const extendA1 = reversed ? this._extendB1 : this._extendA1;
|
|
219464
219286
|
newtonSearcher.setUV(detailA.fraction, detailB.fraction); // use linestring fraction as spiral param; it generally yields a closer point than fractional length!
|
|
@@ -219484,7 +219306,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219484
219306
|
* @param result object to receive appended stroke points; if omitted, a new object is created, populated, and returned.
|
|
219485
219307
|
*/
|
|
219486
219308
|
strokeCurve(curve, options, result) {
|
|
219487
|
-
const ls = result ? result :
|
|
219309
|
+
const ls = result ? result : _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d.create();
|
|
219488
219310
|
curve.emitStrokes(ls, options);
|
|
219489
219311
|
return ls;
|
|
219490
219312
|
}
|
|
@@ -219502,7 +219324,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219502
219324
|
if (spiral0.closestPoint(midPoint, false, detail))
|
|
219503
219325
|
maxError = detail.a;
|
|
219504
219326
|
}
|
|
219505
|
-
if (spiral1 && spiral1 instanceof
|
|
219327
|
+
if (spiral1 && spiral1 instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_19__.TransitionSpiral3d && ls1 && ls1 instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
|
|
219506
219328
|
const maxError1 = this.computeMaxSpiralStrokeError(spiral1, ls1);
|
|
219507
219329
|
if (maxError1 > maxError)
|
|
219508
219330
|
maxError = maxError1;
|
|
@@ -219538,7 +219360,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219538
219360
|
*/
|
|
219539
219361
|
appendDiscreteCloseApproachResults(curveA, lsB, maxDistance, reversed) {
|
|
219540
219362
|
const i0 = this._results.length;
|
|
219541
|
-
const closeApproachPairs =
|
|
219363
|
+
const closeApproachPairs = _CurveCurve__WEBPACK_IMPORTED_MODULE_20__.CurveCurve.closeApproachProjectedXYPairs(reversed ? lsB : curveA, reversed ? curveA : lsB, maxDistance);
|
|
219542
219364
|
closeApproachPairs.sort((p0, p1) => p0.detailA.a - p1.detailA.a);
|
|
219543
219365
|
this._results.push(...closeApproachPairs);
|
|
219544
219366
|
return this._results.length - i0;
|
|
@@ -219554,7 +219376,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219554
219376
|
*/
|
|
219555
219377
|
dispatchCurveSpiral(curveA, extendA0, extendA1, spiralB, reversed) {
|
|
219556
219378
|
let cpA = curveA;
|
|
219557
|
-
if (curveA instanceof
|
|
219379
|
+
if (curveA instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_19__.TransitionSpiral3d) {
|
|
219558
219380
|
cpA = this.strokeCurve(curveA);
|
|
219559
219381
|
extendA0 = extendA1 = false;
|
|
219560
219382
|
}
|
|
@@ -219566,6 +219388,137 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219566
219388
|
this.appendDiscreteCloseApproachResults(cpA, cpB, maxError, reversed); // seeds for finding tangent intersections
|
|
219567
219389
|
this.refineSpiralResultsByNewton(curveA, spiralB, index0, reversed);
|
|
219568
219390
|
}
|
|
219391
|
+
/**
|
|
219392
|
+
* Invoke dispatch on each child of `g` as "geometryA".
|
|
219393
|
+
* * If `g` is a `Path` or `Loop`, adjust extension flags for geometryA accordingly.
|
|
219394
|
+
*/
|
|
219395
|
+
handleChildren(g) {
|
|
219396
|
+
const children = g.children;
|
|
219397
|
+
if (!children)
|
|
219398
|
+
return;
|
|
219399
|
+
const saveExtendA0 = this._extendA0;
|
|
219400
|
+
const saveExtendA1 = this._extendA1;
|
|
219401
|
+
for (let i = 0; i < children.length; i++) {
|
|
219402
|
+
let extendA0 = saveExtendA0;
|
|
219403
|
+
let extendA1 = saveExtendA1;
|
|
219404
|
+
if (g instanceof _Path__WEBPACK_IMPORTED_MODULE_15__.Path && children.length > 1) {
|
|
219405
|
+
if (i === 0)
|
|
219406
|
+
extendA1 = false; // first child can only extend from start
|
|
219407
|
+
else if (i === children.length - 1)
|
|
219408
|
+
extendA0 = false; // last child can only extend from end
|
|
219409
|
+
else
|
|
219410
|
+
extendA0 = extendA1 = false; // middle children cannot extend
|
|
219411
|
+
}
|
|
219412
|
+
else if (g instanceof _Loop__WEBPACK_IMPORTED_MODULE_16__.Loop) {
|
|
219413
|
+
extendA0 = extendA1 = false; // Loops cannot extend
|
|
219414
|
+
}
|
|
219415
|
+
this.resetGeometryA(extendA0, extendA1);
|
|
219416
|
+
children[i].dispatchToGeometryHandler(this);
|
|
219417
|
+
}
|
|
219418
|
+
this.resetGeometryA(saveExtendA0, saveExtendA1);
|
|
219419
|
+
}
|
|
219420
|
+
/** Double dispatch handler for strongly typed segment. */
|
|
219421
|
+
handleLineSegment3d(segmentA) {
|
|
219422
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_21__.LineSegment3d) {
|
|
219423
|
+
const segmentB = this._geometryB;
|
|
219424
|
+
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);
|
|
219425
|
+
}
|
|
219426
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
|
|
219427
|
+
this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219428
|
+
}
|
|
219429
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_22__.Arc3d) {
|
|
219430
|
+
this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219431
|
+
}
|
|
219432
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_23__.BSplineCurve3d) {
|
|
219433
|
+
this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219434
|
+
}
|
|
219435
|
+
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_19__.TransitionSpiral3d) {
|
|
219436
|
+
this.dispatchCurveSpiral(segmentA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
219437
|
+
}
|
|
219438
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
219439
|
+
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
219440
|
+
}
|
|
219441
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex) {
|
|
219442
|
+
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
219443
|
+
}
|
|
219444
|
+
return undefined;
|
|
219445
|
+
}
|
|
219446
|
+
/** Double dispatch handler for strongly typed linestring. */
|
|
219447
|
+
handleLineString3d(lsA) {
|
|
219448
|
+
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
|
|
219449
|
+
const lsB = this._geometryB;
|
|
219450
|
+
this.computeLineStringLineString(lsA, this._extendA0, this._extendA1, lsB, this._extendB0, this._extendB1, false);
|
|
219451
|
+
}
|
|
219452
|
+
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_21__.LineSegment3d) {
|
|
219453
|
+
this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
219454
|
+
}
|
|
219455
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_22__.Arc3d) {
|
|
219456
|
+
this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
219457
|
+
}
|
|
219458
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_23__.BSplineCurve3d) {
|
|
219459
|
+
this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219460
|
+
}
|
|
219461
|
+
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_19__.TransitionSpiral3d) {
|
|
219462
|
+
this.dispatchCurveSpiral(lsA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
219463
|
+
}
|
|
219464
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
219465
|
+
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
219466
|
+
}
|
|
219467
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex) {
|
|
219468
|
+
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
219469
|
+
}
|
|
219470
|
+
return undefined;
|
|
219471
|
+
}
|
|
219472
|
+
/** Double dispatch handler for strongly typed arc. */
|
|
219473
|
+
handleArc3d(arcA) {
|
|
219474
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_21__.LineSegment3d) {
|
|
219475
|
+
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arcA, this._extendA0, this._extendA1, true);
|
|
219476
|
+
}
|
|
219477
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
|
|
219478
|
+
this.computeArcLineString(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219479
|
+
}
|
|
219480
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_22__.Arc3d) {
|
|
219481
|
+
this.dispatchArcArc(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219482
|
+
}
|
|
219483
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_23__.BSplineCurve3d) {
|
|
219484
|
+
this.dispatchArcBsplineCurve3d(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
219485
|
+
}
|
|
219486
|
+
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_19__.TransitionSpiral3d) {
|
|
219487
|
+
this.dispatchCurveSpiral(arcA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
219488
|
+
}
|
|
219489
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
219490
|
+
this.dispatchCurveCollection(arcA, this.handleArc3d.bind(this));
|
|
219491
|
+
}
|
|
219492
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex) {
|
|
219493
|
+
this.dispatchCurveChainWithDistanceIndex(arcA, this.handleArc3d.bind(this));
|
|
219494
|
+
}
|
|
219495
|
+
return undefined;
|
|
219496
|
+
}
|
|
219497
|
+
/** Double dispatch handler for strongly typed bspline curve. */
|
|
219498
|
+
handleBSplineCurve3d(curveA) {
|
|
219499
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_21__.LineSegment3d) {
|
|
219500
|
+
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
|
|
219501
|
+
}
|
|
219502
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
|
|
219503
|
+
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
|
|
219504
|
+
}
|
|
219505
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_22__.Arc3d) {
|
|
219506
|
+
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
|
|
219507
|
+
}
|
|
219508
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_23__.BSplineCurve3dBase) {
|
|
219509
|
+
this.dispatchBSplineCurve3dBSplineCurve3d(curveA, this._geometryB, false);
|
|
219510
|
+
}
|
|
219511
|
+
else if (this._geometryB instanceof _spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_19__.TransitionSpiral3d) {
|
|
219512
|
+
this.dispatchCurveSpiral(curveA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
219513
|
+
}
|
|
219514
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_14__.CurveCollection) {
|
|
219515
|
+
this.dispatchCurveCollection(curveA, this.handleBSplineCurve3d.bind(this));
|
|
219516
|
+
}
|
|
219517
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex) {
|
|
219518
|
+
this.dispatchCurveChainWithDistanceIndex(curveA, this.handleBSplineCurve3d.bind(this));
|
|
219519
|
+
}
|
|
219520
|
+
return undefined;
|
|
219521
|
+
}
|
|
219569
219522
|
/** Double dispatch handler for strongly typed spiral curve. */
|
|
219570
219523
|
handleTransitionSpiral(spiral) {
|
|
219571
219524
|
if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_17__.CurveChainWithDistanceIndex) {
|
|
@@ -219587,19 +219540,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
219587
219540
|
}
|
|
219588
219541
|
/** Double dispatch handler for strongly typed homogeneous bspline curve. */
|
|
219589
219542
|
handleBSplineCurve3dH(_curve) {
|
|
219590
|
-
/*
|
|
219591
219543
|
// NEEDS WORK -- make "dispatch" methods tolerant of both 3d and 3dH .
|
|
219592
219544
|
// "easy" if both present BezierCurve3dH span loaders
|
|
219593
|
-
if (this._geometryB instanceof LineSegment3d) {
|
|
219594
|
-
this.dispatchSegmentBsplineCurve(
|
|
219595
|
-
this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB,
|
|
219596
|
-
curve, this._extendA, true);
|
|
219597
|
-
} else if (this._geometryB instanceof LineString3d) {
|
|
219598
|
-
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB, curve, this._extendA, true);
|
|
219599
|
-
} else if (this._geometryB instanceof Arc3d) {
|
|
219600
|
-
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB, curve, this._extendA, true);
|
|
219601
|
-
}
|
|
219602
|
-
*/
|
|
219603
219545
|
return undefined;
|
|
219604
219546
|
}
|
|
219605
219547
|
}
|
|
@@ -242877,9 +242819,8 @@ class Point4dArray {
|
|
|
242877
242819
|
* @return packed weighted point array
|
|
242878
242820
|
*/
|
|
242879
242821
|
static packPointsAndWeightsToFloat64Array(data, weights, result) {
|
|
242880
|
-
let points;
|
|
242881
242822
|
if (Array.isArray(data) && data[0] instanceof _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d) {
|
|
242882
|
-
points = data;
|
|
242823
|
+
const points = data;
|
|
242883
242824
|
if (points.length !== weights.length)
|
|
242884
242825
|
return undefined;
|
|
242885
242826
|
const numValues = 4 * points.length;
|
|
@@ -242893,18 +242834,18 @@ class Point4dArray {
|
|
|
242893
242834
|
}
|
|
242894
242835
|
return result;
|
|
242895
242836
|
}
|
|
242896
|
-
|
|
242837
|
+
const numericData = data;
|
|
242897
242838
|
const numPoints = weights.length;
|
|
242898
|
-
if (
|
|
242839
|
+
if (numericData.length !== 3 * numPoints)
|
|
242899
242840
|
return undefined;
|
|
242900
242841
|
const numValues1 = 4 * numPoints;
|
|
242901
242842
|
if (!result || result.length < numValues1)
|
|
242902
242843
|
result = new Float64Array(numValues1);
|
|
242903
242844
|
for (let i = 0, k = 0; k < numPoints; k++) {
|
|
242904
242845
|
const k0 = 3 * k;
|
|
242905
|
-
result[i++] =
|
|
242906
|
-
result[i++] =
|
|
242907
|
-
result[i++] =
|
|
242846
|
+
result[i++] = numericData[k0];
|
|
242847
|
+
result[i++] = numericData[k0 + 1];
|
|
242848
|
+
result[i++] = numericData[k0 + 2];
|
|
242908
242849
|
result[i++] = weights[k];
|
|
242909
242850
|
}
|
|
242910
242851
|
return result;
|
|
@@ -326458,7 +326399,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
326458
326399
|
/***/ ((module) => {
|
|
326459
326400
|
|
|
326460
326401
|
"use strict";
|
|
326461
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.9.0-dev.
|
|
326402
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.9.0-dev.16","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 && npm run -s copy:draco","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 ES2022 --outDir lib/esm","clean":"rimraf -g 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","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","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 \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","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:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.9","@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/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"~4.3.4","@loaders.gl/draco":"~4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
326462
326403
|
|
|
326463
326404
|
/***/ })
|
|
326464
326405
|
|