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

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
@@ -39,7 +39,7 @@ class BooleanOperationTool extends ElementGeometryTool_1.ElementGeometryCacheToo
39
39
  const tools = this.agenda.elements.slice(1);
40
40
  const params = { mode: this.mode, tools };
41
41
  const opts = { writeChanges: true };
42
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("booleanOperation", target, params, opts);
42
+ return await this.commandConnection.booleanOperation(target, params, opts);
43
43
  }
44
44
  catch (err) {
45
45
  return undefined;
@@ -106,7 +106,7 @@ class SewSheetElementsTool extends ElementGeometryTool_1.ElementGeometryCacheToo
106
106
  const tools = this.agenda.elements.slice(1);
107
107
  const params = { tools };
108
108
  const opts = { writeChanges: true };
109
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("sewSheets", target, params, opts);
109
+ return await this.commandConnection.sewSheets(target, params, opts);
110
110
  }
111
111
  catch (err) {
112
112
  return undefined;
@@ -153,7 +153,7 @@ class ThickenSheetElementsTool extends ElementGeometryTool_1.ElementGeometryCach
153
153
  const target = this.agenda.elements[0];
154
154
  const params = { front: this.frontDistance, back: this.backDistance };
155
155
  const opts = { writeChanges: true };
156
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("thickenSheets", target, params, opts);
156
+ return await this.commandConnection.thickenSheets(target, params, opts);
157
157
  }
158
158
  catch (err) {
159
159
  return undefined;
@@ -226,7 +226,7 @@ class CutSolidElementsTool extends ElementGeometryTool_1.ElementGeometryCacheToo
226
226
  return true;
227
227
  try {
228
228
  this._startedCmd = await this.startCommand();
229
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("isPlanarBody", id, 0);
229
+ return await this.commandConnection.isPlanarBody(id, 0);
230
230
  }
231
231
  catch (err) {
232
232
  return false;
@@ -248,7 +248,7 @@ class CutSolidElementsTool extends ElementGeometryTool_1.ElementGeometryCacheToo
248
248
  const profile = this.agenda.elements[1];
249
249
  const params = { profile, direction, depth, distance: this.depth, outside: this.outside ? true : undefined, closeOpen: editor_common_1.ProfileClosure.Auto, targetPoint: this.targetPoint, toolPoint: this.toolPoint };
250
250
  const opts = { writeChanges: true };
251
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("cutSolid", target, params, opts);
251
+ return await this.commandConnection.cutSolid(target, params, opts);
252
252
  }
253
253
  catch (err) {
254
254
  return undefined;
@@ -314,7 +314,7 @@ class EmbossSolidElementsTool extends ElementGeometryTool_1.ElementGeometryCache
314
314
  const profile = this.agenda.elements[1];
315
315
  const params = { profile, direction: editor_common_1.EmbossDirectionMode.Auto, targetPoint: this.targetPoint };
316
316
  const opts = { writeChanges: true };
317
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("embossBody", target, params, opts);
317
+ return await this.commandConnection.embossBody(target, params, opts);
318
318
  }
319
319
  catch (err) {
320
320
  return undefined;
@@ -354,7 +354,7 @@ class SweepAlongPathTool extends ElementGeometryTool_1.ElementGeometryCacheTool
354
354
  const path = this.agenda.elements[1];
355
355
  const params = { path };
356
356
  const opts = { writeChanges: true };
357
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("sweepAlongPath", target, params, opts);
357
+ return await this.commandConnection.sweepAlongPath(target, params, opts);
358
358
  }
359
359
  catch (err) {
360
360
  return undefined;
@@ -390,7 +390,7 @@ class LoftProfilesTool extends ElementGeometryTool_1.ElementGeometryCacheTool {
390
390
  const tools = this.agenda.elements.slice(1);
391
391
  const params = { tools, orderCurves: this.isSelectionSetModify ? true : undefined, orientCurves: true };
392
392
  const opts = { writeChanges: true };
393
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("loftProfiles", target, params, opts);
393
+ return await this.commandConnection.loftProfiles(target, params, opts);
394
394
  }
395
395
  catch (err) {
396
396
  return undefined;
@@ -472,7 +472,7 @@ class OffsetFacesTool extends ElementGeometryTool_1.LocateSubEntityTool {
472
472
  async getSmoothFaces(id, face) {
473
473
  try {
474
474
  // NOTE: For offset, include all smoothly connected faces, not just adjacent...
475
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, face, editor_common_1.SubEntityType.Face, { smoothFaces: true });
475
+ return await this.commandConnection.getConnectedSubEntities(id, face, editor_common_1.SubEntityType.Face, { smoothFaces: true });
476
476
  }
477
477
  catch (err) {
478
478
  return undefined;
@@ -525,7 +525,7 @@ class OffsetFacesTool extends ElementGeometryTool_1.LocateSubEntityTool {
525
525
  requestId: `${this.toolId}:${id}`,
526
526
  writeChanges: isAccept ? true : undefined,
527
527
  };
528
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("offsetFaces", id, params, opts);
528
+ return await this.commandConnection.offsetFaces(id, params, opts);
529
529
  }
530
530
  catch (err) {
531
531
  return undefined;
@@ -603,7 +603,7 @@ class HollowFacesTool extends ElementGeometryTool_1.LocateSubEntityTool {
603
603
  requestId: `${this.toolId}:${this.agenda.elements[0]}`,
604
604
  writeChanges: isAccept ? true : undefined,
605
605
  };
606
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("hollowFaces", this.agenda.elements[0], params, opts);
606
+ return await this.commandConnection.hollowFaces(this.agenda.elements[0], params, opts);
607
607
  }
608
608
  catch (err) {
609
609
  return undefined;
@@ -657,7 +657,7 @@ class DeleteSubEntitiesTool extends ElementGeometryTool_1.LocateSubEntityTool {
657
657
  if (editor_common_1.SubEntityType.Face === hits[0].subEntity.type)
658
658
  return hits.filter((hit) => { return editor_common_1.SubEntityType.Face === hit.subEntity.type; });
659
659
  try {
660
- const accept = await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("isRedundantEdge", id, hits[0].subEntity);
660
+ const accept = await this.commandConnection.isRedundantEdge(id, hits[0].subEntity);
661
661
  if (accept)
662
662
  return hits;
663
663
  if (hits.length > 1 && editor_common_1.SubEntityType.Face === hits[1].subEntity.type)
@@ -680,7 +680,7 @@ class DeleteSubEntitiesTool extends ElementGeometryTool_1.LocateSubEntityTool {
680
680
  requestId: `${this.toolId}:${this.agenda.elements[0]}`,
681
681
  writeChanges: isAccept ? true : undefined,
682
682
  };
683
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("deleteSubEntities", this.agenda.elements[0], params, opts);
683
+ return await this.commandConnection.deleteSubEntities(this.agenda.elements[0], params, opts);
684
684
  }
685
685
  catch (err) {
686
686
  return undefined;
@@ -786,11 +786,11 @@ class ImprintSolidElementsTool extends ElementGeometryTool_1.LocateSubEntityTool
786
786
  const edge = (_b = this.getAcceptedSubEntityData(0)) === null || _b === void 0 ? void 0 : _b.props;
787
787
  if (undefined === edge)
788
788
  return undefined;
789
- const edgeFaces = await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, edge, editor_common_1.SubEntityType.Face);
789
+ const edgeFaces = await this.commandConnection.getConnectedSubEntities(id, edge, editor_common_1.SubEntityType.Face);
790
790
  if (undefined === edgeFaces || 0 === edgeFaces.length)
791
791
  return undefined;
792
792
  // TODO: Check planar face...get preferred face from cursor location in dynamics, etc.
793
- const edgeLoop = await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, edge, editor_common_1.SubEntityType.Edge, { loopFace: edgeFaces[0] });
793
+ const edgeLoop = await this.commandConnection.getConnectedSubEntities(id, edge, editor_common_1.SubEntityType.Edge, { loopFace: edgeFaces[0] });
794
794
  if (undefined === edgeLoop || 0 === edgeLoop.length)
795
795
  return undefined;
796
796
  params = { imprint: edgeLoop, face: edgeFaces[0], distance: this.distance, extend: this.extend ? true : undefined };
@@ -799,7 +799,7 @@ class ImprintSolidElementsTool extends ElementGeometryTool_1.LocateSubEntityTool
799
799
  params = { imprint: this.agenda.elements[1], extend: this.extend ? true : undefined };
800
800
  }
801
801
  const opts = { writeChanges: true };
802
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("imprintBody", id, params, opts);
802
+ return await this.commandConnection.imprintBody(id, params, opts);
803
803
  }
804
804
  catch (err) {
805
805
  return undefined;
@@ -914,7 +914,7 @@ class BlendEdgesTool extends ElementGeometryTool_1.LocateSubEntityTool {
914
914
  }
915
915
  async getTangentEdges(id, edge) {
916
916
  try {
917
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, edge, editor_common_1.SubEntityType.Edge, { smoothEdges: true });
917
+ return await this.commandConnection.getConnectedSubEntities(id, edge, editor_common_1.SubEntityType.Edge, { smoothEdges: true });
918
918
  }
919
919
  catch (err) {
920
920
  return undefined;
@@ -1012,7 +1012,7 @@ class RoundEdgesTool extends BlendEdgesTool {
1012
1012
  requestId: `${this.toolId}:${this.agenda.elements[0]}`,
1013
1013
  writeChanges: isAccept ? true : undefined,
1014
1014
  };
1015
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("blendEdges", this.agenda.elements[0], params, opts);
1015
+ return await this.commandConnection.blendEdges(this.agenda.elements[0], params, opts);
1016
1016
  }
1017
1017
  catch (err) {
1018
1018
  return undefined;
@@ -1112,7 +1112,7 @@ class ChamferEdgesTool extends BlendEdgesTool {
1112
1112
  requestId: `${this.toolId}:${this.agenda.elements[0]}`,
1113
1113
  writeChanges: isAccept ? true : undefined,
1114
1114
  };
1115
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("chamferEdges", this.agenda.elements[0], params, opts);
1115
+ return await this.commandConnection.chamferEdges(this.agenda.elements[0], params, opts);
1116
1116
  }
1117
1117
  catch (err) {
1118
1118
  return undefined;
@@ -1260,7 +1260,7 @@ class SweepFacesTool extends LocateFaceOrProfileTool {
1260
1260
  async getSmoothFaces(id, face) {
1261
1261
  try {
1262
1262
  // NOTE: For sweep/translation, it makes sense to limit smooth to immediately adjacent...
1263
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("getConnectedSubEntities", id, face, editor_common_1.SubEntityType.Face, { smoothFaces: true, adjacentFaces: true });
1263
+ return await this.commandConnection.getConnectedSubEntities(id, face, editor_common_1.SubEntityType.Face, { smoothFaces: true, adjacentFaces: true });
1264
1264
  }
1265
1265
  catch (err) {
1266
1266
  return undefined;
@@ -1296,7 +1296,7 @@ class SweepFacesTool extends LocateFaceOrProfileTool {
1296
1296
  const subEntities = this.getAcceptedSubEntities();
1297
1297
  const params = { path };
1298
1298
  if (editor_common_1.SubEntityType.Edge === subEntities[0].type || editor_common_1.BRepEntityType.Solid !== this.getBRepEntityTypeForSubEntity(id, subEntities[0])) {
1299
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("sweepFaces", id, params, opts);
1299
+ return await this.commandConnection.sweepFaces(id, params, opts);
1300
1300
  }
1301
1301
  if (this.addSmooth) {
1302
1302
  const allSmoothFaces = [];
@@ -1311,7 +1311,7 @@ class SweepFacesTool extends LocateFaceOrProfileTool {
1311
1311
  }
1312
1312
  }
1313
1313
  params.faces = subEntities;
1314
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("sweepFaces", id, params, opts);
1314
+ return await this.commandConnection.sweepFaces(id, params, opts);
1315
1315
  }
1316
1316
  catch (err) {
1317
1317
  return undefined;
@@ -1391,14 +1391,14 @@ class SpinFacesTool extends LocateFaceOrProfileTool {
1391
1391
  const subEntities = this.getAcceptedSubEntities();
1392
1392
  const params = { origin, direction, angle };
1393
1393
  if (editor_common_1.SubEntityType.Edge === subEntities[0].type || editor_common_1.BRepEntityType.Solid !== this.getBRepEntityTypeForSubEntity(id, subEntities[0])) {
1394
- return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("spinFaces", id, params, opts);
1394
+ return await this.commandConnection.spinFaces(id, params, opts);
1395
1395
  }
1396
1396
  params.faces = subEntities;
1397
- let result = await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("spinFaces", id, params, opts);
1397
+ let result = await this.commandConnection.spinFaces(id, params, opts);
1398
1398
  // Spun face can be used to create a pocket...retry with negative sweep...
1399
1399
  if (undefined === result) {
1400
1400
  angle.setRadians(-angle.radians);
1401
- result = await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("spinFaces", id, params, opts);
1401
+ result = await this.commandConnection.spinFaces(id, params, opts);
1402
1402
  }
1403
1403
  return result;
1404
1404
  }