@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.
- package/lib/cjs/DeleteElementsTool.d.ts +1 -1
- package/lib/cjs/DeleteElementsTool.d.ts.map +1 -1
- package/lib/cjs/DeleteElementsTool.js +5 -4
- package/lib/cjs/DeleteElementsTool.js.map +1 -1
- package/lib/cjs/EditTool.d.ts +6 -1
- package/lib/cjs/EditTool.d.ts.map +1 -1
- package/lib/cjs/EditTool.js +11 -2
- package/lib/cjs/EditTool.js.map +1 -1
- package/lib/cjs/ElementGeometryTool.d.ts +1 -1
- package/lib/cjs/ElementGeometryTool.d.ts.map +1 -1
- package/lib/cjs/ElementGeometryTool.js +6 -8
- package/lib/cjs/ElementGeometryTool.js.map +1 -1
- package/lib/cjs/ModifyCurveTools.d.ts +1 -1
- package/lib/cjs/ModifyCurveTools.d.ts.map +1 -1
- package/lib/cjs/ModifyCurveTools.js +4 -6
- package/lib/cjs/ModifyCurveTools.js.map +1 -1
- package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.d.ts +1 -1
- package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.d.ts.map +1 -1
- package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.js +5 -4
- package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.js.map +1 -1
- package/lib/cjs/SketchTools.d.ts +1 -1
- package/lib/cjs/SketchTools.d.ts.map +1 -1
- package/lib/cjs/SketchTools.js +4 -6
- package/lib/cjs/SketchTools.js.map +1 -1
- package/lib/cjs/SolidModelingTools.js +25 -25
- package/lib/cjs/SolidModelingTools.js.map +1 -1
- package/lib/cjs/SolidPrimitiveTools.d.ts +1 -1
- package/lib/cjs/SolidPrimitiveTools.d.ts.map +1 -1
- package/lib/cjs/SolidPrimitiveTools.js +2 -4
- package/lib/cjs/SolidPrimitiveTools.js.map +1 -1
- package/lib/cjs/TransformElementsTool.d.ts +1 -1
- package/lib/cjs/TransformElementsTool.d.ts.map +1 -1
- package/lib/cjs/TransformElementsTool.js +7 -6
- package/lib/cjs/TransformElementsTool.js.map +1 -1
- package/lib/esm/DeleteElementsTool.d.ts +1 -1
- package/lib/esm/DeleteElementsTool.d.ts.map +1 -1
- package/lib/esm/DeleteElementsTool.js +5 -4
- package/lib/esm/DeleteElementsTool.js.map +1 -1
- package/lib/esm/EditTool.d.ts +6 -1
- package/lib/esm/EditTool.d.ts.map +1 -1
- package/lib/esm/EditTool.js +11 -2
- package/lib/esm/EditTool.js.map +1 -1
- package/lib/esm/ElementGeometryTool.d.ts +1 -1
- package/lib/esm/ElementGeometryTool.d.ts.map +1 -1
- package/lib/esm/ElementGeometryTool.js +6 -8
- package/lib/esm/ElementGeometryTool.js.map +1 -1
- package/lib/esm/ModifyCurveTools.d.ts +1 -1
- package/lib/esm/ModifyCurveTools.d.ts.map +1 -1
- package/lib/esm/ModifyCurveTools.js +4 -6
- package/lib/esm/ModifyCurveTools.js.map +1 -1
- package/lib/esm/ProjectLocation/ProjectExtentsDecoration.d.ts +1 -1
- package/lib/esm/ProjectLocation/ProjectExtentsDecoration.d.ts.map +1 -1
- package/lib/esm/ProjectLocation/ProjectExtentsDecoration.js +5 -4
- package/lib/esm/ProjectLocation/ProjectExtentsDecoration.js.map +1 -1
- package/lib/esm/SketchTools.d.ts +1 -1
- package/lib/esm/SketchTools.d.ts.map +1 -1
- package/lib/esm/SketchTools.js +4 -6
- package/lib/esm/SketchTools.js.map +1 -1
- package/lib/esm/SolidModelingTools.js +25 -25
- package/lib/esm/SolidModelingTools.js.map +1 -1
- package/lib/esm/SolidPrimitiveTools.d.ts +1 -1
- package/lib/esm/SolidPrimitiveTools.d.ts.map +1 -1
- package/lib/esm/SolidPrimitiveTools.js +2 -4
- package/lib/esm/SolidPrimitiveTools.js.map +1 -1
- package/lib/esm/TransformElementsTool.d.ts +1 -1
- package/lib/esm/TransformElementsTool.d.ts.map +1 -1
- package/lib/esm/TransformElementsTool.js +7 -6
- package/lib/esm/TransformElementsTool.js.map +1 -1
- 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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1394
|
+
return await this.commandConnection.spinFaces(id, params, opts);
|
|
1395
1395
|
}
|
|
1396
1396
|
params.faces = subEntities;
|
|
1397
|
-
let result = await
|
|
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
|
|
1401
|
+
result = await this.commandConnection.spinFaces(id, params, opts);
|
|
1402
1402
|
}
|
|
1403
1403
|
return result;
|
|
1404
1404
|
}
|