@itwin/editor-frontend 3.5.0-dev.21 → 3.5.0-dev.22

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.
Files changed (69) hide show
  1. package/lib/cjs/DeleteElementsTool.d.ts +1 -1
  2. package/lib/cjs/DeleteElementsTool.d.ts.map +1 -1
  3. package/lib/cjs/DeleteElementsTool.js +5 -4
  4. package/lib/cjs/DeleteElementsTool.js.map +1 -1
  5. package/lib/cjs/EditTool.d.ts +6 -1
  6. package/lib/cjs/EditTool.d.ts.map +1 -1
  7. package/lib/cjs/EditTool.js +11 -2
  8. package/lib/cjs/EditTool.js.map +1 -1
  9. package/lib/cjs/ElementGeometryTool.d.ts +1 -1
  10. package/lib/cjs/ElementGeometryTool.d.ts.map +1 -1
  11. package/lib/cjs/ElementGeometryTool.js +6 -8
  12. package/lib/cjs/ElementGeometryTool.js.map +1 -1
  13. package/lib/cjs/ModifyCurveTools.d.ts +1 -1
  14. package/lib/cjs/ModifyCurveTools.d.ts.map +1 -1
  15. package/lib/cjs/ModifyCurveTools.js +4 -6
  16. package/lib/cjs/ModifyCurveTools.js.map +1 -1
  17. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.d.ts +1 -1
  18. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.d.ts.map +1 -1
  19. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.js +5 -4
  20. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.js.map +1 -1
  21. package/lib/cjs/SketchTools.d.ts +1 -1
  22. package/lib/cjs/SketchTools.d.ts.map +1 -1
  23. package/lib/cjs/SketchTools.js +4 -6
  24. package/lib/cjs/SketchTools.js.map +1 -1
  25. package/lib/cjs/SolidModelingTools.js +25 -25
  26. package/lib/cjs/SolidModelingTools.js.map +1 -1
  27. package/lib/cjs/SolidPrimitiveTools.d.ts +1 -1
  28. package/lib/cjs/SolidPrimitiveTools.d.ts.map +1 -1
  29. package/lib/cjs/SolidPrimitiveTools.js +2 -4
  30. package/lib/cjs/SolidPrimitiveTools.js.map +1 -1
  31. package/lib/cjs/TransformElementsTool.d.ts +1 -1
  32. package/lib/cjs/TransformElementsTool.d.ts.map +1 -1
  33. package/lib/cjs/TransformElementsTool.js +7 -6
  34. package/lib/cjs/TransformElementsTool.js.map +1 -1
  35. package/lib/esm/DeleteElementsTool.d.ts +1 -1
  36. package/lib/esm/DeleteElementsTool.d.ts.map +1 -1
  37. package/lib/esm/DeleteElementsTool.js +5 -4
  38. package/lib/esm/DeleteElementsTool.js.map +1 -1
  39. package/lib/esm/EditTool.d.ts +6 -1
  40. package/lib/esm/EditTool.d.ts.map +1 -1
  41. package/lib/esm/EditTool.js +11 -2
  42. package/lib/esm/EditTool.js.map +1 -1
  43. package/lib/esm/ElementGeometryTool.d.ts +1 -1
  44. package/lib/esm/ElementGeometryTool.d.ts.map +1 -1
  45. package/lib/esm/ElementGeometryTool.js +6 -8
  46. package/lib/esm/ElementGeometryTool.js.map +1 -1
  47. package/lib/esm/ModifyCurveTools.d.ts +1 -1
  48. package/lib/esm/ModifyCurveTools.d.ts.map +1 -1
  49. package/lib/esm/ModifyCurveTools.js +4 -6
  50. package/lib/esm/ModifyCurveTools.js.map +1 -1
  51. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.d.ts +1 -1
  52. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.d.ts.map +1 -1
  53. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.js +5 -4
  54. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.js.map +1 -1
  55. package/lib/esm/SketchTools.d.ts +1 -1
  56. package/lib/esm/SketchTools.d.ts.map +1 -1
  57. package/lib/esm/SketchTools.js +4 -6
  58. package/lib/esm/SketchTools.js.map +1 -1
  59. package/lib/esm/SolidModelingTools.js +25 -25
  60. package/lib/esm/SolidModelingTools.js.map +1 -1
  61. package/lib/esm/SolidPrimitiveTools.d.ts +1 -1
  62. package/lib/esm/SolidPrimitiveTools.d.ts.map +1 -1
  63. package/lib/esm/SolidPrimitiveTools.js +2 -4
  64. package/lib/esm/SolidPrimitiveTools.js.map +1 -1
  65. package/lib/esm/TransformElementsTool.d.ts +1 -1
  66. package/lib/esm/TransformElementsTool.d.ts.map +1 -1
  67. package/lib/esm/TransformElementsTool.js +7 -6
  68. package/lib/esm/TransformElementsTool.js.map +1 -1
  69. package/package.json +15 -15
@@ -36,7 +36,7 @@ export class BooleanOperationTool extends ElementGeometryCacheTool {
36
36
  const tools = this.agenda.elements.slice(1);
37
37
  const params = { mode: this.mode, tools };
38
38
  const opts = { writeChanges: true };
39
- return await ElementGeometryCacheTool.callCommand("booleanOperation", target, params, opts);
39
+ return await this.commandConnection.booleanOperation(target, params, opts);
40
40
  }
41
41
  catch (err) {
42
42
  return undefined;
@@ -99,7 +99,7 @@ export class SewSheetElementsTool extends ElementGeometryCacheTool {
99
99
  const tools = this.agenda.elements.slice(1);
100
100
  const params = { tools };
101
101
  const opts = { writeChanges: true };
102
- return await ElementGeometryCacheTool.callCommand("sewSheets", target, params, opts);
102
+ return await this.commandConnection.sewSheets(target, params, opts);
103
103
  }
104
104
  catch (err) {
105
105
  return undefined;
@@ -145,7 +145,7 @@ export class ThickenSheetElementsTool extends ElementGeometryCacheTool {
145
145
  const target = this.agenda.elements[0];
146
146
  const params = { front: this.frontDistance, back: this.backDistance };
147
147
  const opts = { writeChanges: true };
148
- return await ElementGeometryCacheTool.callCommand("thickenSheets", target, params, opts);
148
+ return await this.commandConnection.thickenSheets(target, params, opts);
149
149
  }
150
150
  catch (err) {
151
151
  return undefined;
@@ -217,7 +217,7 @@ export class CutSolidElementsTool extends ElementGeometryCacheTool {
217
217
  return true;
218
218
  try {
219
219
  this._startedCmd = await this.startCommand();
220
- return await ElementGeometryCacheTool.callCommand("isPlanarBody", id, 0);
220
+ return await this.commandConnection.isPlanarBody(id, 0);
221
221
  }
222
222
  catch (err) {
223
223
  return false;
@@ -239,7 +239,7 @@ export class CutSolidElementsTool extends ElementGeometryCacheTool {
239
239
  const profile = this.agenda.elements[1];
240
240
  const params = { profile, direction, depth, distance: this.depth, outside: this.outside ? true : undefined, closeOpen: ProfileClosure.Auto, targetPoint: this.targetPoint, toolPoint: this.toolPoint };
241
241
  const opts = { writeChanges: true };
242
- return await ElementGeometryCacheTool.callCommand("cutSolid", target, params, opts);
242
+ return await this.commandConnection.cutSolid(target, params, opts);
243
243
  }
244
244
  catch (err) {
245
245
  return undefined;
@@ -304,7 +304,7 @@ export class EmbossSolidElementsTool extends ElementGeometryCacheTool {
304
304
  const profile = this.agenda.elements[1];
305
305
  const params = { profile, direction: EmbossDirectionMode.Auto, targetPoint: this.targetPoint };
306
306
  const opts = { writeChanges: true };
307
- return await ElementGeometryCacheTool.callCommand("embossBody", target, params, opts);
307
+ return await this.commandConnection.embossBody(target, params, opts);
308
308
  }
309
309
  catch (err) {
310
310
  return undefined;
@@ -343,7 +343,7 @@ export class SweepAlongPathTool extends ElementGeometryCacheTool {
343
343
  const path = this.agenda.elements[1];
344
344
  const params = { path };
345
345
  const opts = { writeChanges: true };
346
- return await ElementGeometryCacheTool.callCommand("sweepAlongPath", target, params, opts);
346
+ return await this.commandConnection.sweepAlongPath(target, params, opts);
347
347
  }
348
348
  catch (err) {
349
349
  return undefined;
@@ -378,7 +378,7 @@ export class LoftProfilesTool extends ElementGeometryCacheTool {
378
378
  const tools = this.agenda.elements.slice(1);
379
379
  const params = { tools, orderCurves: this.isSelectionSetModify ? true : undefined, orientCurves: true };
380
380
  const opts = { writeChanges: true };
381
- return await ElementGeometryCacheTool.callCommand("loftProfiles", target, params, opts);
381
+ return await this.commandConnection.loftProfiles(target, params, opts);
382
382
  }
383
383
  catch (err) {
384
384
  return undefined;
@@ -458,7 +458,7 @@ export class OffsetFacesTool extends LocateSubEntityTool {
458
458
  async getSmoothFaces(id, face) {
459
459
  try {
460
460
  // NOTE: For offset, include all smoothly connected faces, not just adjacent...
461
- return await ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, face, SubEntityType.Face, { smoothFaces: true });
461
+ return await this.commandConnection.getConnectedSubEntities(id, face, SubEntityType.Face, { smoothFaces: true });
462
462
  }
463
463
  catch (err) {
464
464
  return undefined;
@@ -511,7 +511,7 @@ export class OffsetFacesTool extends LocateSubEntityTool {
511
511
  requestId: `${this.toolId}:${id}`,
512
512
  writeChanges: isAccept ? true : undefined,
513
513
  };
514
- return await ElementGeometryCacheTool.callCommand("offsetFaces", id, params, opts);
514
+ return await this.commandConnection.offsetFaces(id, params, opts);
515
515
  }
516
516
  catch (err) {
517
517
  return undefined;
@@ -588,7 +588,7 @@ export class HollowFacesTool extends LocateSubEntityTool {
588
588
  requestId: `${this.toolId}:${this.agenda.elements[0]}`,
589
589
  writeChanges: isAccept ? true : undefined,
590
590
  };
591
- return await ElementGeometryCacheTool.callCommand("hollowFaces", this.agenda.elements[0], params, opts);
591
+ return await this.commandConnection.hollowFaces(this.agenda.elements[0], params, opts);
592
592
  }
593
593
  catch (err) {
594
594
  return undefined;
@@ -641,7 +641,7 @@ export class DeleteSubEntitiesTool extends LocateSubEntityTool {
641
641
  if (SubEntityType.Face === hits[0].subEntity.type)
642
642
  return hits.filter((hit) => { return SubEntityType.Face === hit.subEntity.type; });
643
643
  try {
644
- const accept = await ElementGeometryCacheTool.callCommand("isRedundantEdge", id, hits[0].subEntity);
644
+ const accept = await this.commandConnection.isRedundantEdge(id, hits[0].subEntity);
645
645
  if (accept)
646
646
  return hits;
647
647
  if (hits.length > 1 && SubEntityType.Face === hits[1].subEntity.type)
@@ -664,7 +664,7 @@ export class DeleteSubEntitiesTool extends LocateSubEntityTool {
664
664
  requestId: `${this.toolId}:${this.agenda.elements[0]}`,
665
665
  writeChanges: isAccept ? true : undefined,
666
666
  };
667
- return await ElementGeometryCacheTool.callCommand("deleteSubEntities", this.agenda.elements[0], params, opts);
667
+ return await this.commandConnection.deleteSubEntities(this.agenda.elements[0], params, opts);
668
668
  }
669
669
  catch (err) {
670
670
  return undefined;
@@ -769,11 +769,11 @@ export class ImprintSolidElementsTool extends LocateSubEntityTool {
769
769
  const edge = (_b = this.getAcceptedSubEntityData(0)) === null || _b === void 0 ? void 0 : _b.props;
770
770
  if (undefined === edge)
771
771
  return undefined;
772
- const edgeFaces = await ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, edge, SubEntityType.Face);
772
+ const edgeFaces = await this.commandConnection.getConnectedSubEntities(id, edge, SubEntityType.Face);
773
773
  if (undefined === edgeFaces || 0 === edgeFaces.length)
774
774
  return undefined;
775
775
  // TODO: Check planar face...get preferred face from cursor location in dynamics, etc.
776
- const edgeLoop = await ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, edge, SubEntityType.Edge, { loopFace: edgeFaces[0] });
776
+ const edgeLoop = await this.commandConnection.getConnectedSubEntities(id, edge, SubEntityType.Edge, { loopFace: edgeFaces[0] });
777
777
  if (undefined === edgeLoop || 0 === edgeLoop.length)
778
778
  return undefined;
779
779
  params = { imprint: edgeLoop, face: edgeFaces[0], distance: this.distance, extend: this.extend ? true : undefined };
@@ -782,7 +782,7 @@ export class ImprintSolidElementsTool extends LocateSubEntityTool {
782
782
  params = { imprint: this.agenda.elements[1], extend: this.extend ? true : undefined };
783
783
  }
784
784
  const opts = { writeChanges: true };
785
- return await ElementGeometryCacheTool.callCommand("imprintBody", id, params, opts);
785
+ return await this.commandConnection.imprintBody(id, params, opts);
786
786
  }
787
787
  catch (err) {
788
788
  return undefined;
@@ -896,7 +896,7 @@ export class BlendEdgesTool extends LocateSubEntityTool {
896
896
  }
897
897
  async getTangentEdges(id, edge) {
898
898
  try {
899
- return await ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, edge, SubEntityType.Edge, { smoothEdges: true });
899
+ return await this.commandConnection.getConnectedSubEntities(id, edge, SubEntityType.Edge, { smoothEdges: true });
900
900
  }
901
901
  catch (err) {
902
902
  return undefined;
@@ -993,7 +993,7 @@ export class RoundEdgesTool extends BlendEdgesTool {
993
993
  requestId: `${this.toolId}:${this.agenda.elements[0]}`,
994
994
  writeChanges: isAccept ? true : undefined,
995
995
  };
996
- return await ElementGeometryCacheTool.callCommand("blendEdges", this.agenda.elements[0], params, opts);
996
+ return await this.commandConnection.blendEdges(this.agenda.elements[0], params, opts);
997
997
  }
998
998
  catch (err) {
999
999
  return undefined;
@@ -1092,7 +1092,7 @@ export class ChamferEdgesTool extends BlendEdgesTool {
1092
1092
  requestId: `${this.toolId}:${this.agenda.elements[0]}`,
1093
1093
  writeChanges: isAccept ? true : undefined,
1094
1094
  };
1095
- return await ElementGeometryCacheTool.callCommand("chamferEdges", this.agenda.elements[0], params, opts);
1095
+ return await this.commandConnection.chamferEdges(this.agenda.elements[0], params, opts);
1096
1096
  }
1097
1097
  catch (err) {
1098
1098
  return undefined;
@@ -1237,7 +1237,7 @@ export class SweepFacesTool extends LocateFaceOrProfileTool {
1237
1237
  async getSmoothFaces(id, face) {
1238
1238
  try {
1239
1239
  // NOTE: For sweep/translation, it makes sense to limit smooth to immediately adjacent...
1240
- return await ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, face, SubEntityType.Face, { smoothFaces: true, adjacentFaces: true });
1240
+ return await this.commandConnection.getConnectedSubEntities(id, face, SubEntityType.Face, { smoothFaces: true, adjacentFaces: true });
1241
1241
  }
1242
1242
  catch (err) {
1243
1243
  return undefined;
@@ -1273,7 +1273,7 @@ export class SweepFacesTool extends LocateFaceOrProfileTool {
1273
1273
  const subEntities = this.getAcceptedSubEntities();
1274
1274
  const params = { path };
1275
1275
  if (SubEntityType.Edge === subEntities[0].type || BRepEntityType.Solid !== this.getBRepEntityTypeForSubEntity(id, subEntities[0])) {
1276
- return await ElementGeometryCacheTool.callCommand("sweepFaces", id, params, opts);
1276
+ return await this.commandConnection.sweepFaces(id, params, opts);
1277
1277
  }
1278
1278
  if (this.addSmooth) {
1279
1279
  const allSmoothFaces = [];
@@ -1288,7 +1288,7 @@ export class SweepFacesTool extends LocateFaceOrProfileTool {
1288
1288
  }
1289
1289
  }
1290
1290
  params.faces = subEntities;
1291
- return await ElementGeometryCacheTool.callCommand("sweepFaces", id, params, opts);
1291
+ return await this.commandConnection.sweepFaces(id, params, opts);
1292
1292
  }
1293
1293
  catch (err) {
1294
1294
  return undefined;
@@ -1367,14 +1367,14 @@ export class SpinFacesTool extends LocateFaceOrProfileTool {
1367
1367
  const subEntities = this.getAcceptedSubEntities();
1368
1368
  const params = { origin, direction, angle };
1369
1369
  if (SubEntityType.Edge === subEntities[0].type || BRepEntityType.Solid !== this.getBRepEntityTypeForSubEntity(id, subEntities[0])) {
1370
- return await ElementGeometryCacheTool.callCommand("spinFaces", id, params, opts);
1370
+ return await this.commandConnection.spinFaces(id, params, opts);
1371
1371
  }
1372
1372
  params.faces = subEntities;
1373
- let result = await ElementGeometryCacheTool.callCommand("spinFaces", id, params, opts);
1373
+ let result = await this.commandConnection.spinFaces(id, params, opts);
1374
1374
  // Spun face can be used to create a pocket...retry with negative sweep...
1375
1375
  if (undefined === result) {
1376
1376
  angle.setRadians(-angle.radians);
1377
- result = await ElementGeometryCacheTool.callCommand("spinFaces", id, params, opts);
1377
+ result = await this.commandConnection.spinFaces(id, params, opts);
1378
1378
  }
1379
1379
  return result;
1380
1380
  }