@itwin/rpcinterface-full-stack-tests 5.12.0-dev.11 → 5.12.0-dev.13
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/bundled-tests.js +109 -90
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -117612,14 +117612,13 @@ class DrawingViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__.ViewStat
|
|
|
117612
117612
|
let displaySpatialView = false;
|
|
117613
117613
|
try {
|
|
117614
117614
|
const ecsql = `
|
|
117615
|
-
SELECT spatialView,
|
|
117615
|
+
SELECT spatialView.Id as spatialViewId,
|
|
117616
117616
|
json_extract(jsonProperties, '$.drawingToSpatialTransform') as drawingToSpatialTransform,
|
|
117617
117617
|
CAST(json_extract(jsonProperties, '$.displaySpatialView') as BOOLEAN) as displaySpatialView
|
|
117618
117618
|
FROM bis.SectionDrawing
|
|
117619
117619
|
WHERE ECInstanceId=${this.baseModelId}`;
|
|
117620
|
-
|
|
117621
|
-
|
|
117622
|
-
spatialView = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromJSON(row.spatialView?.id);
|
|
117620
|
+
for await (const row of this.iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseECSqlPropertyNames })) {
|
|
117621
|
+
spatialView = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromJSON(row.spatialViewId);
|
|
117623
117622
|
displaySpatialView = !!row.displaySpatialView;
|
|
117624
117623
|
try {
|
|
117625
117624
|
drawingToSpatialTransform = JSON.parse(row.drawingToSpatialTransform);
|
|
@@ -122842,24 +122841,24 @@ class SnapshotConnection extends IModelConnection {
|
|
|
122842
122841
|
return [];
|
|
122843
122842
|
const select3d = `
|
|
122844
122843
|
SELECT
|
|
122845
|
-
ECInstanceId,
|
|
122844
|
+
ECInstanceId as id,
|
|
122846
122845
|
Origin.x as x, Origin.y as y, Origin.z as z,
|
|
122847
122846
|
BBoxLow.x as lx, BBoxLow.y as ly, BBoxLow.z as lz,
|
|
122848
122847
|
BBoxHigh.x as hx, BBoxHigh.y as hy, BBoxHigh.z as hz,
|
|
122849
|
-
Yaw, Pitch, Roll,
|
|
122850
|
-
NULL as
|
|
122848
|
+
Yaw as yaw, Pitch as pitch, Roll as roll,
|
|
122849
|
+
NULL as rotation
|
|
122851
122850
|
FROM bis.GeometricElement3d
|
|
122852
122851
|
WHERE Origin IS NOT NULL AND BBoxLow IS NOT NULL AND BBoxHigh IS NOT NULL`;
|
|
122853
122852
|
// Note: For the UNION ALL statement, the column aliases in select2d are ignored - so they
|
|
122854
122853
|
// must match those in select3d.
|
|
122855
122854
|
const select2d = `
|
|
122856
122855
|
SELECT
|
|
122857
|
-
ECInstanceId,
|
|
122856
|
+
ECInstanceId as id,
|
|
122858
122857
|
Origin.x as x, Origin.y as y, NULL as z,
|
|
122859
122858
|
BBoxLow.x as lx, BBoxLow.y as ly, NULL as lz,
|
|
122860
122859
|
BBoxHigh.x as hx, BBoxHigh.y as hy, NULL as hz,
|
|
122861
122860
|
NULL as yaw, NULL as pitch, NULL as roll,
|
|
122862
|
-
Rotation
|
|
122861
|
+
Rotation as rotation
|
|
122863
122862
|
FROM bis.GeometricElement2d
|
|
122864
122863
|
WHERE Origin IS NOT NULL AND BBoxLow IS NOT NULL AND BBoxHigh IS NOT NULL`;
|
|
122865
122864
|
const idCriterion = `ECInstanceId IN (${ids.join(",")})`;
|
|
@@ -122881,8 +122880,7 @@ class SnapshotConnection extends IModelConnection {
|
|
|
122881
122880
|
break;
|
|
122882
122881
|
}
|
|
122883
122882
|
const placements = new Array();
|
|
122884
|
-
|
|
122885
|
-
for await (const queryRow of this._iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
|
|
122883
|
+
for await (const queryRow of this._iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseECSqlPropertyNames })) {
|
|
122886
122884
|
const row = queryRow.toRow();
|
|
122887
122885
|
const origin = [row.x, row.y, row.z];
|
|
122888
122886
|
const bbox = {
|
|
@@ -129697,10 +129695,9 @@ class ViewCreator2d {
|
|
|
129697
129695
|
async _addSheetViewProps(modelId, props) {
|
|
129698
129696
|
let width = 0;
|
|
129699
129697
|
let height = 0;
|
|
129700
|
-
|
|
129701
|
-
|
|
129702
|
-
|
|
129703
|
-
height = row.height;
|
|
129698
|
+
for await (const row of this._imodel.createQueryReader(`SELECT Width, Height FROM bis.Sheet WHERE ECInstanceId = ?`, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryBinder.from([modelId]), { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseECSqlPropertyNames })) {
|
|
129699
|
+
width = row.Width;
|
|
129700
|
+
height = row.Height;
|
|
129704
129701
|
break;
|
|
129705
129702
|
}
|
|
129706
129703
|
const sheetProps = {
|
|
@@ -129744,7 +129741,7 @@ class ViewCreator2d {
|
|
|
129744
129741
|
* @param modelId of target model.
|
|
129745
129742
|
*/
|
|
129746
129743
|
async _getViewDefinitionsIdForModel(modelId) {
|
|
129747
|
-
const query = `SELECT ECInstanceId from Bis.ViewDefinition2D WHERE BaseModel.Id = ${modelId} AND isPrivate = false LIMIT 1`;
|
|
129744
|
+
const query = `SELECT ECInstanceId as id from Bis.ViewDefinition2D WHERE BaseModel.Id = ${modelId} AND isPrivate = false LIMIT 1`;
|
|
129748
129745
|
const viewDefinitionsId = await this._executeQuery(query);
|
|
129749
129746
|
return (viewDefinitionsId.length) > 0 ? viewDefinitionsId[0] : undefined;
|
|
129750
129747
|
}
|
|
@@ -129752,7 +129749,7 @@ class ViewCreator2d {
|
|
|
129752
129749
|
* Get all drawing categories
|
|
129753
129750
|
*/
|
|
129754
129751
|
async _getAllCategories() {
|
|
129755
|
-
const query = "SELECT ECInstanceId from BisCore.DrawingCategory";
|
|
129752
|
+
const query = "SELECT ECInstanceId as id from BisCore.DrawingCategory";
|
|
129756
129753
|
const categories = await this._executeQuery(query);
|
|
129757
129754
|
return categories;
|
|
129758
129755
|
}
|
|
@@ -129761,7 +129758,7 @@ class ViewCreator2d {
|
|
|
129761
129758
|
* @param modelId of target model.
|
|
129762
129759
|
*/
|
|
129763
129760
|
async _getSheetAttachments(modelId) {
|
|
129764
|
-
const query = `SELECT ECInstanceId FROM Bis.ViewAttachment WHERE Model.Id = ${modelId}`;
|
|
129761
|
+
const query = `SELECT ECInstanceId as id FROM Bis.ViewAttachment WHERE Model.Id = ${modelId}`;
|
|
129765
129762
|
const attachments = await this._executeQuery(query);
|
|
129766
129763
|
return attachments;
|
|
129767
129764
|
}
|
|
@@ -129771,8 +129768,7 @@ class ViewCreator2d {
|
|
|
129771
129768
|
*/
|
|
129772
129769
|
_executeQuery = async (query) => {
|
|
129773
129770
|
const rows = [];
|
|
129774
|
-
|
|
129775
|
-
for await (const row of this._imodel.createQueryReader(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames }))
|
|
129771
|
+
for await (const row of this._imodel.createQueryReader(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseECSqlPropertyNames }))
|
|
129776
129772
|
rows.push(row.id);
|
|
129777
129773
|
return rows;
|
|
129778
129774
|
};
|
|
@@ -196274,6 +196270,9 @@ class GltfReader {
|
|
|
196274
196270
|
}
|
|
196275
196271
|
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfMeshMode.LineStrip: {
|
|
196276
196272
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== bufferView); // compiler can't seem to infer this...
|
|
196273
|
+
// Per the KHR_mesh_primitive_restart extension (https://github.com/KhronosGroup/glTF/pull/2569), the indices accessor may contain
|
|
196274
|
+
// "primitive restart" values - the maximum value for the accessor's component type - each of which terminates the current line strip
|
|
196275
|
+
// and begins a new one. This permits many strips to be batched into a single primitive.
|
|
196277
196276
|
const restart = _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte === bufferView.type ? 0xff : (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort === bufferView.type ? 0xffff : 0xffffffff);
|
|
196278
196277
|
for (const index of data.buffer) {
|
|
196279
196278
|
if (index === restart) {
|
|
@@ -211984,8 +211983,7 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
|
|
|
211984
211983
|
// When assembly parent is selected, pick all geometric elements with it as the parent.
|
|
211985
211984
|
// When assembly member is selected, pick the parent as well as all the other members.
|
|
211986
211985
|
const ecsql = `SELECT ECInstanceId as id, Parent.Id as parentId FROM BisCore.GeometricElement WHERE Parent.Id IN (SELECT Parent.Id as parentId FROM BisCore.GeometricElement WHERE (parent.Id IS NOT NULL AND ECInstanceId IN (${id})) OR parent.Id IN (${id}))`;
|
|
211987
|
-
|
|
211988
|
-
for await (const row of this.iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
|
|
211986
|
+
for await (const row of this.iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseECSqlPropertyNames })) {
|
|
211989
211987
|
ids.add(row.parentId);
|
|
211990
211988
|
ids.add(row.id);
|
|
211991
211989
|
}
|
|
@@ -251647,12 +251645,14 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
251647
251645
|
return true;
|
|
251648
251646
|
}
|
|
251649
251647
|
/** Test the fraction by strict parameter, but allow toleranced distance test at ends. */
|
|
251650
|
-
acceptFractionOnLine(extend0, fraction, extend1, pointA, pointB
|
|
251648
|
+
acceptFractionOnLine(extend0, fraction, extend1, pointA, pointB) {
|
|
251651
251649
|
if (!extend0 && fraction < 0) {
|
|
251652
|
-
return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(fraction * pointA.
|
|
251650
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(fraction * fraction * pointA.distanceSquaredXY(pointB), this._coincidentGeometryContext.tolerance * this._coincidentGeometryContext.tolerance);
|
|
251651
|
+
}
|
|
251652
|
+
else if (!extend1 && fraction > 1.0) {
|
|
251653
|
+
const f = fraction - 1;
|
|
251654
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(f * f * pointA.distanceSquaredXY(pointB), this._coincidentGeometryContext.tolerance * this._coincidentGeometryContext.tolerance);
|
|
251653
251655
|
}
|
|
251654
|
-
else if (!extend1 && fraction > 1.0)
|
|
251655
|
-
return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol((fraction - 1.0) * pointA.distanceXY(pointB), tolerance);
|
|
251656
251656
|
return true;
|
|
251657
251657
|
}
|
|
251658
251658
|
/**
|
|
@@ -251666,7 +251666,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
251666
251666
|
return result;
|
|
251667
251667
|
}
|
|
251668
251668
|
/**
|
|
251669
|
-
* Record the pre-computed intersection between two curves.
|
|
251669
|
+
* Record the pre-computed intersection between two curves. Record with fraction mapping.
|
|
251670
251670
|
* @param localFractionA intersection fraction local to the subcurve of cpA between fractionA0 and fractionA1
|
|
251671
251671
|
* @param cpA the first curve
|
|
251672
251672
|
* @param fractionA0 start of the subcurve of cpA
|
|
@@ -251746,8 +251746,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
251746
251746
|
computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
251747
251747
|
const aDir = { x: pointA1.x - pointA0.x, y: pointA1.y - pointA0.y };
|
|
251748
251748
|
const bDir = { x: pointB1.x - pointB0.x, y: pointB1.y - pointB0.y };
|
|
251749
|
-
const
|
|
251750
|
-
const fractions = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegmentXYUVIntersectionUnbounded(pointA0, aDir, pointB0, bDir, tol);
|
|
251749
|
+
const fractions = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegmentXYUVIntersectionUnbounded(pointA0, aDir, pointB0, bDir, this._coincidentGeometryContext.tolerance);
|
|
251751
251750
|
if (!fractions)
|
|
251752
251751
|
return;
|
|
251753
251752
|
if (fractions.f1) { // the lines are coincident
|
|
@@ -251760,8 +251759,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
251760
251759
|
this.recordPointWithLocalFractions(overlap.detailA.fraction, cpA, fractionA0, fractionA1, overlap.detailB.fraction, cpB, fractionB0, fractionB1, reversed, overlap);
|
|
251761
251760
|
}
|
|
251762
251761
|
else { // the lines have a transverse intersection
|
|
251763
|
-
if (this.acceptFractionOnLine(extendA0, fractions.f0.x, extendA1, pointA0, pointA1
|
|
251764
|
-
if (this.acceptFractionOnLine(extendB0, fractions.f0.y, extendB1, pointB0, pointB1
|
|
251762
|
+
if (this.acceptFractionOnLine(extendA0, fractions.f0.x, extendA1, pointA0, pointA1)) {
|
|
251763
|
+
if (this.acceptFractionOnLine(extendB0, fractions.f0.y, extendB1, pointB0, pointB1))
|
|
251765
251764
|
this.recordPointWithLocalFractions(fractions.f0.x, cpA, fractionA0, fractionA1, fractions.f0.y, cpB, fractionB0, fractionB1, reversed);
|
|
251766
251765
|
}
|
|
251767
251766
|
}
|
|
@@ -251826,10 +251825,6 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
251826
251825
|
// solve for theta; evaluate points; project back to line
|
|
251827
251826
|
if (this._worldToLocalPerspective) {
|
|
251828
251827
|
const data = arc.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
251829
|
-
const radians0 = data.sweep.fractionToRadians(0);
|
|
251830
|
-
const pointB0H = data.center.plus2Scaled(data.vector0, Math.cos(radians0), data.vector90, Math.sin(radians0));
|
|
251831
|
-
const radians1 = data.sweep.fractionToRadians(1);
|
|
251832
|
-
const pointB1H = data.center.plus2Scaled(data.vector0, Math.cos(radians1), data.vector90, Math.sin(radians1));
|
|
251833
251828
|
const pointA0H = this._worldToLocalPerspective.multiplyPoint3d(pointA0, 1);
|
|
251834
251829
|
const pointA1H = this._worldToLocalPerspective.multiplyPoint3d(pointA1, 1);
|
|
251835
251830
|
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.center);
|
|
@@ -251838,35 +251833,49 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
251838
251833
|
let numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians, tol2);
|
|
251839
251834
|
const closeApproach = (0 === numRoots);
|
|
251840
251835
|
if (closeApproach)
|
|
251841
|
-
numRoots = 1; //
|
|
251842
|
-
|
|
251843
|
-
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(iRoot), data.vector90, sines.atUncheckedIndex(iRoot));
|
|
251844
|
-
let fArc = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(iRoot), extendB0);
|
|
251845
|
-
let fLine = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, arcPoint);
|
|
251846
|
-
if (fLine === undefined)
|
|
251847
|
-
return undefined;
|
|
251848
|
-
if (!checkOnlyEndPointDistance && this.acceptFraction(extendA0, fLine, extendA1) && this.acceptFraction(extendB0, fArc, extendB1))
|
|
251849
|
-
return { fLine, fArc };
|
|
251850
|
-
// check for an endpoint intersection that is beyond parametric tolerance but within point tolerance
|
|
251851
|
-
fLine = fLine < 0.5 ? 0 : 1;
|
|
251852
|
-
fArc = data.sweep.fractionToSignedPeriodicFraction(fArc) < 0.5 ? 0 : 1;
|
|
251853
|
-
const pointAH = fLine ? pointA1H : pointA0H;
|
|
251854
|
-
const pointBH = fArc ? pointB1H : pointB0H;
|
|
251855
|
-
const dist2 = pointAH.realDistanceSquaredXY(pointBH);
|
|
251856
|
-
return (dist2 !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2, tol2)) ? { fLine, fArc } : undefined;
|
|
251857
|
-
};
|
|
251836
|
+
numRoots = 1; // arc closest approach is the first entry
|
|
251837
|
+
let numAccepted = 0;
|
|
251858
251838
|
for (let i = 0; i < numRoots; i++) {
|
|
251859
|
-
const
|
|
251860
|
-
|
|
251861
|
-
|
|
251839
|
+
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
251840
|
+
const fArc = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(i), extendB0);
|
|
251841
|
+
const fLine = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, arcPoint);
|
|
251842
|
+
if (fLine === undefined)
|
|
251843
|
+
continue;
|
|
251844
|
+
if (closeApproach) {
|
|
251845
|
+
const linePoint = pointA0H.interpolate(fLine, pointA1H);
|
|
251846
|
+
const dist2 = arcPoint.realDistanceSquaredXY(linePoint);
|
|
251847
|
+
if (dist2 === undefined || !_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2, tol2))
|
|
251848
|
+
continue;
|
|
251849
|
+
}
|
|
251850
|
+
if (this.acceptFraction(extendA0, fLine, extendA1) && this.acceptFraction(extendB0, fArc, extendB1)) {
|
|
251851
|
+
this.recordPointWithLocalFractions(fLine, cpA, fractionA0, fractionA1, fArc, arc, 0, 1, reversed);
|
|
251852
|
+
numAccepted++;
|
|
251853
|
+
}
|
|
251854
|
+
}
|
|
251855
|
+
if (numAccepted === 0 && !arc.sweep.isFullCircle) {
|
|
251856
|
+
// check for endpoint intersection beyond parametric tolerance but within point tolerance
|
|
251857
|
+
const pointB0H = this._worldToLocalPerspective.multiplyPoint3d(arc.startPoint(), 1);
|
|
251858
|
+
const pointB1H = this._worldToLocalPerspective.multiplyPoint3d(arc.endPoint(), 1);
|
|
251859
|
+
const dist2 = [];
|
|
251860
|
+
let d2 = pointA0H.realDistanceSquaredXY(pointB0H);
|
|
251861
|
+
if (d2 !== undefined)
|
|
251862
|
+
dist2.push({ d2, fA: 0, fB: 0 });
|
|
251863
|
+
d2 = pointA0H.realDistanceSquaredXY(pointB1H);
|
|
251864
|
+
if (d2 !== undefined)
|
|
251865
|
+
dist2.push({ d2, fA: 0, fB: 1 });
|
|
251866
|
+
d2 = pointA1H.realDistanceSquaredXY(pointB0H);
|
|
251867
|
+
if (d2 !== undefined)
|
|
251868
|
+
dist2.push({ d2, fA: 1, fB: 0 });
|
|
251869
|
+
d2 = pointA1H.realDistanceSquaredXY(pointB1H);
|
|
251870
|
+
if (d2 !== undefined)
|
|
251871
|
+
dist2.push({ d2, fA: 1, fB: 1 });
|
|
251872
|
+
dist2.sort((a, b) => a.d2 - b.d2);
|
|
251873
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2[0].d2, tol2))
|
|
251874
|
+
this.recordPointWithLocalFractions(dist2[0].fA, cpA, fractionA0, fractionA1, dist2[0].fB, arc, 0, 1, reversed);
|
|
251862
251875
|
}
|
|
251863
251876
|
}
|
|
251864
251877
|
else {
|
|
251865
251878
|
const data = arc.toTransformedVectors(this._worldToLocalAffine);
|
|
251866
|
-
const radians0 = data.sweep.fractionToRadians(0);
|
|
251867
|
-
const pointB0Local = data.center.plus2Scaled(data.vector0, Math.cos(radians0), data.vector90, Math.sin(radians0));
|
|
251868
|
-
const radians1 = data.sweep.fractionToRadians(1);
|
|
251869
|
-
const pointB1Local = data.center.plus2Scaled(data.vector0, Math.cos(radians1), data.vector90, Math.sin(radians1));
|
|
251870
251879
|
let pointA0Local = pointA0;
|
|
251871
251880
|
let pointA1Local = pointA1;
|
|
251872
251881
|
if (this._worldToLocalAffine) {
|
|
@@ -251879,27 +251888,40 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
251879
251888
|
let numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians, tol2);
|
|
251880
251889
|
const closeApproach = (0 === numRoots);
|
|
251881
251890
|
if (closeApproach)
|
|
251882
|
-
numRoots = 1; //
|
|
251883
|
-
|
|
251884
|
-
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(iRoot), data.vector90, sines.atUncheckedIndex(iRoot));
|
|
251885
|
-
let fArc = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(iRoot), extendB0);
|
|
251886
|
-
let fLine = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
251887
|
-
if (fLine === undefined)
|
|
251888
|
-
return undefined;
|
|
251889
|
-
if (!checkOnlyEndPointDistance && this.acceptFraction(extendA0, fLine, extendA1) && this.acceptFraction(extendB0, fArc, extendB1))
|
|
251890
|
-
return { fLine, fArc };
|
|
251891
|
-
// check for an endpoint intersection that is beyond parametric tolerance but within point tolerance
|
|
251892
|
-
fLine = fLine < 0.5 ? 0 : 1;
|
|
251893
|
-
fArc = data.sweep.fractionToSignedPeriodicFraction(fArc) < 0.5 ? 0 : 1;
|
|
251894
|
-
const pointALocal = fLine ? pointA1Local : pointA0Local;
|
|
251895
|
-
const pointBLocal = fArc ? pointB1Local : pointB0Local;
|
|
251896
|
-
const dist2 = pointALocal.distanceSquaredXY(pointBLocal);
|
|
251897
|
-
return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2, tol2) ? { fLine, fArc } : undefined;
|
|
251898
|
-
};
|
|
251891
|
+
numRoots = 1; // arc closest approach is the first entry
|
|
251892
|
+
let numAccepted = 0;
|
|
251899
251893
|
for (let i = 0; i < numRoots; i++) {
|
|
251900
|
-
const
|
|
251901
|
-
|
|
251902
|
-
|
|
251894
|
+
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
251895
|
+
const fArc = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(i), extendB0);
|
|
251896
|
+
const fLine = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
251897
|
+
if (fLine === undefined)
|
|
251898
|
+
continue;
|
|
251899
|
+
if (closeApproach) {
|
|
251900
|
+
const linePoint = pointA0Local.interpolate(fLine, pointA1Local);
|
|
251901
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(arcPoint.distanceSquaredXY(linePoint), tol2))
|
|
251902
|
+
continue;
|
|
251903
|
+
}
|
|
251904
|
+
if (this.acceptFraction(extendA0, fLine, extendA1) && this.acceptFraction(extendB0, fArc, extendB1)) {
|
|
251905
|
+
this.recordPointWithLocalFractions(fLine, cpA, fractionA0, fractionA1, fArc, arc, 0, 1, reversed);
|
|
251906
|
+
numAccepted++;
|
|
251907
|
+
}
|
|
251908
|
+
}
|
|
251909
|
+
if (numAccepted === 0 && !arc.sweep.isFullCircle) {
|
|
251910
|
+
// check for endpoint intersection beyond parametric tolerance but within point tolerance
|
|
251911
|
+
const pointB0Local = arc.startPoint();
|
|
251912
|
+
const pointB1Local = arc.endPoint();
|
|
251913
|
+
if (this._worldToLocalAffine) {
|
|
251914
|
+
this._worldToLocalAffine.multiplyXYAndZInPlace(pointB0Local);
|
|
251915
|
+
this._worldToLocalAffine.multiplyXYAndZInPlace(pointB1Local);
|
|
251916
|
+
}
|
|
251917
|
+
const dist2 = [];
|
|
251918
|
+
dist2.push({ d2: pointA0Local.distanceSquaredXY(pointB0Local), fA: 0, fB: 0 });
|
|
251919
|
+
dist2.push({ d2: pointA0Local.distanceSquaredXY(pointB1Local), fA: 0, fB: 1 });
|
|
251920
|
+
dist2.push({ d2: pointA1Local.distanceSquaredXY(pointB0Local), fA: 1, fB: 0 });
|
|
251921
|
+
dist2.push({ d2: pointA1Local.distanceSquaredXY(pointB1Local), fA: 1, fB: 1 });
|
|
251922
|
+
dist2.sort((a, b) => a.d2 - b.d2);
|
|
251923
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2[0].d2, tol2))
|
|
251924
|
+
this.recordPointWithLocalFractions(dist2[0].fA, cpA, fractionA0, fractionA1, dist2[0].fB, arc, 0, 1, reversed);
|
|
251903
251925
|
}
|
|
251904
251926
|
}
|
|
251905
251927
|
}
|
|
@@ -282846,10 +282868,7 @@ class Transform {
|
|
|
282846
282868
|
// Tx = Mx + o so we return Mx + o
|
|
282847
282869
|
return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, point, result);
|
|
282848
282870
|
}
|
|
282849
|
-
/**
|
|
282850
|
-
* Transform the input 3d point in place (using `Tp = M*p + o`).
|
|
282851
|
-
* Return as a new point or in the pre-allocated result (if result is given).
|
|
282852
|
-
*/
|
|
282871
|
+
/** Transform the input 3d point in place (using `Tp = M*p + o`). */
|
|
282853
282872
|
multiplyXYAndZInPlace(point) {
|
|
282854
282873
|
return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesXYZInPlace(this._origin, this._matrix, point);
|
|
282855
282874
|
}
|
|
@@ -289856,11 +289875,11 @@ class AnalyticRoots {
|
|
|
289856
289875
|
* * -2 -- all coefficients identically 0. The entire c, s plane-- and therefore the entire unit circle-- is a solution.
|
|
289857
289876
|
* * -1 -- beta, gamma are zero, alpha is not.There is no line defined.There are no solutions.
|
|
289858
289877
|
* * 0 -- the line is well defined, but passes completely outside the unit circle.
|
|
289859
|
-
* * In this case, (
|
|
289878
|
+
* * In this case, (c[0], s[0]) is the circle point closest to the line and (c[1], s[1]) is the line point closest to the circle.
|
|
289860
289879
|
* * 1 -- the line is tangent to the unit circle.
|
|
289861
289880
|
* * Tangency is determined by tolerances, which calls a "close approach" point a tangency.
|
|
289862
|
-
* * (
|
|
289863
|
-
* * (
|
|
289881
|
+
* * (c[0], s[0]) is the closest circle point
|
|
289882
|
+
* * (c[1], s[1]) is the line point.
|
|
289864
289883
|
* * 2 -- two simple intersections.
|
|
289865
289884
|
* @param alpha constant coefficient on line
|
|
289866
289885
|
* @param beta x cosine coefficient on line
|
|
@@ -289891,15 +289910,15 @@ class AnalyticRoots {
|
|
|
289891
289910
|
if (D2 < -twoTol) {
|
|
289892
289911
|
const delta = Math.sqrt(delta2);
|
|
289893
289912
|
const iota = (alpha < 0) ? (1.0 / delta) : (-1.0 / delta);
|
|
289894
|
-
this.appendCosSinRadians(lambda * beta, lambda * gamma, cosValues, sinValues, radiansValues);
|
|
289895
289913
|
this.appendCosSinRadians(beta * iota, gamma * iota, cosValues, sinValues, radiansValues);
|
|
289914
|
+
this.appendCosSinRadians(lambda * beta, lambda * gamma, cosValues, sinValues, radiansValues);
|
|
289896
289915
|
solutionType = 0;
|
|
289897
289916
|
}
|
|
289898
289917
|
else if (D2 < twoTol) {
|
|
289899
289918
|
const delta = Math.sqrt(delta2);
|
|
289900
289919
|
const iota = (alpha < 0) ? (1.0 / delta) : (-1.0 / delta);
|
|
289901
|
-
this.appendCosSinRadians(lambda * beta, lambda * gamma, cosValues, sinValues, radiansValues);
|
|
289902
289920
|
this.appendCosSinRadians(beta * iota, gamma * iota, cosValues, sinValues, radiansValues);
|
|
289921
|
+
this.appendCosSinRadians(lambda * beta, lambda * gamma, cosValues, sinValues, radiansValues);
|
|
289903
289922
|
solutionType = 1;
|
|
289904
289923
|
}
|
|
289905
289924
|
else {
|
|
@@ -349055,7 +349074,7 @@ class TestContext {
|
|
|
349055
349074
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
349056
349075
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
349057
349076
|
await core_frontend_1.NoRenderApp.startup({
|
|
349058
|
-
applicationVersion: "5.12.0-dev.
|
|
349077
|
+
applicationVersion: "5.12.0-dev.13",
|
|
349059
349078
|
applicationId: this.settings.gprid,
|
|
349060
349079
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
349061
349080
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -376013,7 +376032,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
376013
376032
|
/***/ ((module) => {
|
|
376014
376033
|
|
|
376015
376034
|
"use strict";
|
|
376016
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.12.0-dev.
|
|
376035
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.12.0-dev.13","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.10","@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/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.8","@vitest/coverage-v8":"^4.1.8","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":"^4.1.8","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"}}');
|
|
376017
376036
|
|
|
376018
376037
|
/***/ }),
|
|
376019
376038
|
|