@itwin/editor-frontend 3.0.0-dev.136 → 3.0.0-dev.141
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/ElementGeometryTool.d.ts +7 -1
- package/lib/cjs/ElementGeometryTool.d.ts.map +1 -1
- package/lib/cjs/ElementGeometryTool.js +43 -5
- package/lib/cjs/ElementGeometryTool.js.map +1 -1
- package/lib/cjs/SketchTools.d.ts +18 -4
- package/lib/cjs/SketchTools.d.ts.map +1 -1
- package/lib/cjs/SketchTools.js +146 -24
- package/lib/cjs/SketchTools.js.map +1 -1
- package/lib/cjs/SolidModelingTools.d.ts +25 -13
- package/lib/cjs/SolidModelingTools.d.ts.map +1 -1
- package/lib/cjs/SolidModelingTools.js +99 -55
- package/lib/cjs/SolidModelingTools.js.map +1 -1
- package/lib/esm/ElementGeometryTool.d.ts +7 -1
- package/lib/esm/ElementGeometryTool.d.ts.map +1 -1
- package/lib/esm/ElementGeometryTool.js +44 -6
- package/lib/esm/ElementGeometryTool.js.map +1 -1
- package/lib/esm/SketchTools.d.ts +18 -4
- package/lib/esm/SketchTools.d.ts.map +1 -1
- package/lib/esm/SketchTools.js +147 -25
- package/lib/esm/SketchTools.js.map +1 -1
- package/lib/esm/SolidModelingTools.d.ts +25 -13
- package/lib/esm/SolidModelingTools.d.ts.map +1 -1
- package/lib/esm/SolidModelingTools.js +99 -57
- package/lib/esm/SolidModelingTools.js.map +1 -1
- package/lib/public/locales/en/Editor.json +2 -1
- package/package.json +13 -13
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Id64String } from "@itwin/core-bentley";
|
|
5
5
|
import { BooleanMode, ChamferMode, ElementGeometryCacheFilter, ElementGeometryResultProps, SubEntityFilter, SubEntityLocationProps, SubEntityProps, SubEntityType } from "@itwin/editor-common";
|
|
6
|
-
import { Point3d, Vector3d, XYZProps } from "@itwin/core-geometry";
|
|
6
|
+
import { Matrix3d, Point3d, Vector3d, XYZProps } from "@itwin/core-geometry";
|
|
7
7
|
import { BeButtonEvent, DecorateContext, DynamicsContext, EventHandled, HitDetail } from "@itwin/core-frontend";
|
|
8
8
|
import { ElementGeometryCacheTool, LocateSubEntityTool, SubEntityData } from "./ElementGeometryTool";
|
|
9
9
|
/** @alpha Base class for tools that perform boolean operations on a set of elements. */
|
|
@@ -195,7 +195,7 @@ export declare class ImprintSolidElementsTool extends LocateSubEntityTool {
|
|
|
195
195
|
protected setupAccuDraw(): void;
|
|
196
196
|
onRestartTool(): Promise<void>;
|
|
197
197
|
}
|
|
198
|
-
/** @alpha
|
|
198
|
+
/** @alpha Base class for tools to identify edges of solids and surfaces and apply blends. */
|
|
199
199
|
export declare abstract class BlendEdgesTool extends LocateSubEntityTool {
|
|
200
200
|
protected propagateSmooth: boolean;
|
|
201
201
|
protected wantSubEntityType(type: SubEntityType): boolean;
|
|
@@ -225,34 +225,46 @@ export declare class ChamferEdgesTool extends BlendEdgesTool {
|
|
|
225
225
|
protected applyAgendaOperation(ev: BeButtonEvent, isAccept: boolean): Promise<ElementGeometryResultProps | undefined>;
|
|
226
226
|
onRestartTool(): Promise<void>;
|
|
227
227
|
}
|
|
228
|
+
/** @alpha */
|
|
229
|
+
export declare class ProfileLocationData {
|
|
230
|
+
point: Point3d;
|
|
231
|
+
orientation: Vector3d | Matrix3d;
|
|
232
|
+
constructor(point: Point3d, orientation: Vector3d | Matrix3d);
|
|
233
|
+
}
|
|
234
|
+
/** @alpha Base class for picking profiles (open paths and regions) or faces of solids. */
|
|
235
|
+
export declare abstract class LocateFaceOrProfileTool extends LocateSubEntityTool {
|
|
236
|
+
protected get wantGeometrySummary(): boolean;
|
|
237
|
+
protected wantSubEntityType(type: SubEntityType): boolean;
|
|
238
|
+
protected get geometryCacheFilter(): ElementGeometryCacheFilter | undefined;
|
|
239
|
+
protected doPickSubEntities(id: Id64String, ev: BeButtonEvent): Promise<SubEntityLocationProps[] | undefined>;
|
|
240
|
+
protected createSubEntityData(id: Id64String, hit: SubEntityLocationProps): Promise<SubEntityData>;
|
|
241
|
+
protected drawSubEntity(context: DecorateContext, subEntity: SubEntityData, accepted: boolean): void;
|
|
242
|
+
protected drawAcceptedSubEntities(context: DecorateContext): void;
|
|
243
|
+
}
|
|
228
244
|
/** @alpha Identify faces of solids and surfaces to translate. */
|
|
229
|
-
export declare class SweepFacesTool extends
|
|
245
|
+
export declare class SweepFacesTool extends LocateFaceOrProfileTool {
|
|
230
246
|
static toolId: string;
|
|
231
247
|
static iconSpec: string;
|
|
248
|
+
protected get wantDynamics(): boolean;
|
|
249
|
+
protected get wantAccuSnap(): boolean;
|
|
250
|
+
protected get wantSubEntitySnap(): boolean;
|
|
232
251
|
protected useDistance: boolean;
|
|
233
252
|
protected distance: number;
|
|
234
253
|
protected addSmoothFaces: boolean;
|
|
235
|
-
protected get wantDynamics(): boolean;
|
|
236
|
-
protected get wantAccuSnap(): boolean;
|
|
237
|
-
protected get geometryCacheFilter(): ElementGeometryCacheFilter | undefined;
|
|
238
|
-
protected createSubEntityData(id: Id64String, hit: SubEntityLocationProps): Promise<SubEntityData>;
|
|
239
|
-
protected drawAcceptedSubEntities(context: DecorateContext): void;
|
|
240
254
|
protected getSmoothFaces(id: Id64String, face: SubEntityProps): Promise<SubEntityProps[] | undefined>;
|
|
241
255
|
protected applyAgendaOperation(ev: BeButtonEvent, isAccept: boolean): Promise<ElementGeometryResultProps | undefined>;
|
|
242
256
|
protected setupAccuDraw(): void;
|
|
243
257
|
onRestartTool(): Promise<void>;
|
|
244
258
|
}
|
|
245
259
|
/** @alpha Identify faces of solids and surfaces to revolve. */
|
|
246
|
-
export declare class SpinFacesTool extends
|
|
260
|
+
export declare class SpinFacesTool extends LocateFaceOrProfileTool {
|
|
247
261
|
static toolId: string;
|
|
248
262
|
static iconSpec: string;
|
|
249
|
-
protected points: Point3d[];
|
|
250
263
|
protected sweep: number;
|
|
264
|
+
protected points: Point3d[];
|
|
251
265
|
protected get wantDynamics(): boolean;
|
|
252
266
|
protected get wantAccuSnap(): boolean;
|
|
253
|
-
protected get
|
|
254
|
-
protected getSubEntityFilter(): SubEntityFilter | undefined;
|
|
255
|
-
protected createSubEntityData(id: Id64String, hit: SubEntityLocationProps): Promise<SubEntityData>;
|
|
267
|
+
protected get wantSubEntitySnap(): boolean;
|
|
256
268
|
protected applyAgendaOperation(ev: BeButtonEvent, isAccept: boolean): Promise<ElementGeometryResultProps | undefined>;
|
|
257
269
|
onDynamicFrame(ev: BeButtonEvent, context: DynamicsContext): void;
|
|
258
270
|
protected gatherInput(ev: BeButtonEvent): Promise<EventHandled | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidModelingTools.d.ts","sourceRoot":"","sources":["../../src/SolidModelingTools.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAa,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAmB,WAAW,
|
|
1
|
+
{"version":3,"file":"SolidModelingTools.d.ts","sourceRoot":"","sources":["../../src/SolidModelingTools.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAa,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAmB,WAAW,EAA4D,WAAW,EAAkE,0BAA0B,EAAgC,0BAA0B,EAAgJ,eAAe,EAAE,sBAAsB,EAAE,cAAc,EAAE,aAAa,EAAsD,MAAM,sBAAsB,CAAC;AAE3iB,OAAO,EAAiC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAiC,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAe,SAAS,EAAuB,MAAM,sBAAsB,CAAC;AAEjL,OAAO,EAAE,wBAAwB,EAAmB,mBAAmB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtH,wFAAwF;AACxF,8BAAsB,oBAAqB,SAAQ,wBAAwB;IACzE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C;cASlF,oBAAoB,CAAC,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC;cAwDjH,aAAa,IAAI,IAAI;IAkB3B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5C;AAED,+DAA+D;AAC/D,qBAAa,aAAc,SAAQ,uBAAuB;IACxD,OAAuB,MAAM,SAAe;IAC5C,OAAuB,QAAQ,SAAe;IAG9C,SAAS,CAAC,KAAK,SAAwB;IACvC,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,CAAM;IAEjC,cAAuB,YAAY,IAAI,OAAO,CAAiB;IAC/D,cAAuB,YAAY,IAAI,OAAO,CAAiB;IAC/D,cAAuB,iBAAiB,IAAI,OAAO,CAAiB;cAE3C,oBAAoB,CAAC,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC;IA4CpH,cAAc,CAAC,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI;cAgBxD,WAAW,CAAC,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAO1F,cAAuB,mBAAmB,IAAI,OAAO,CAEpD;cAEkB,aAAa,IAAI,IAAI;IAqB3B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5C"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Editing
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.SpinFacesTool = exports.SweepFacesTool = exports.ChamferEdgesTool = exports.RoundEdgesTool = exports.BlendEdgesTool = exports.ImprintSolidElementsTool = exports.ImprintSolidMethod = exports.DeleteSubEntitiesTool = exports.HollowFacesTool = exports.OffsetFacesTool = exports.FaceLocationData = exports.LoftProfilesTool = exports.SweepAlongPathTool = exports.EmbossSolidElementsTool = exports.CutSolidElementsTool = exports.ThickenSheetElementsTool = exports.SewSheetElementsTool = exports.IntersectSolidElementsTool = exports.SubtractSolidElementsTool = exports.UniteSolidElementsTool = exports.BooleanOperationTool = void 0;
|
|
10
|
+
exports.SpinFacesTool = exports.SweepFacesTool = exports.LocateFaceOrProfileTool = exports.ProfileLocationData = exports.ChamferEdgesTool = exports.RoundEdgesTool = exports.BlendEdgesTool = exports.ImprintSolidElementsTool = exports.ImprintSolidMethod = exports.DeleteSubEntitiesTool = exports.HollowFacesTool = exports.OffsetFacesTool = exports.FaceLocationData = exports.LoftProfilesTool = exports.SweepAlongPathTool = exports.EmbossSolidElementsTool = exports.CutSolidElementsTool = exports.ThickenSheetElementsTool = exports.SewSheetElementsTool = exports.IntersectSolidElementsTool = exports.SubtractSolidElementsTool = exports.UniteSolidElementsTool = exports.BooleanOperationTool = void 0;
|
|
11
11
|
const editor_common_1 = require("@itwin/editor-common");
|
|
12
12
|
const core_common_1 = require("@itwin/core-common");
|
|
13
13
|
const core_geometry_1 = require("@itwin/core-geometry");
|
|
@@ -692,6 +692,7 @@ class ImprintSolidElementsTool extends ElementGeometryTool_1.LocateSubEntityTool
|
|
|
692
692
|
this.points.push(ev.point.clone());
|
|
693
693
|
if (!ev.isControlKey)
|
|
694
694
|
break;
|
|
695
|
+
this.setupAndPromptForNextAction();
|
|
695
696
|
return core_frontend_1.EventHandled.No;
|
|
696
697
|
}
|
|
697
698
|
default:
|
|
@@ -733,7 +734,7 @@ class ImprintSolidElementsTool extends ElementGeometryTool_1.LocateSubEntityTool
|
|
|
733
734
|
exports.ImprintSolidElementsTool = ImprintSolidElementsTool;
|
|
734
735
|
ImprintSolidElementsTool.toolId = "ImprintSolids";
|
|
735
736
|
ImprintSolidElementsTool.iconSpec = "icon-move"; // TODO: Need better icon...
|
|
736
|
-
/** @alpha
|
|
737
|
+
/** @alpha Base class for tools to identify edges of solids and surfaces and apply blends. */
|
|
737
738
|
class BlendEdgesTool extends ElementGeometryTool_1.LocateSubEntityTool {
|
|
738
739
|
constructor() {
|
|
739
740
|
super(...arguments);
|
|
@@ -883,39 +884,83 @@ class ChamferEdgesTool extends BlendEdgesTool {
|
|
|
883
884
|
exports.ChamferEdgesTool = ChamferEdgesTool;
|
|
884
885
|
ChamferEdgesTool.toolId = "ChamferEdges";
|
|
885
886
|
ChamferEdgesTool.iconSpec = "icon-move"; // TODO: Need better icon...
|
|
886
|
-
/** @alpha
|
|
887
|
-
class
|
|
888
|
-
constructor() {
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
887
|
+
/** @alpha */
|
|
888
|
+
class ProfileLocationData {
|
|
889
|
+
constructor(point, orientation) {
|
|
890
|
+
this.point = point;
|
|
891
|
+
this.orientation = orientation;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
exports.ProfileLocationData = ProfileLocationData;
|
|
895
|
+
/** @alpha Base class for picking profiles (open paths and regions) or faces of solids. */
|
|
896
|
+
class LocateFaceOrProfileTool extends ElementGeometryTool_1.LocateSubEntityTool {
|
|
897
|
+
get wantGeometrySummary() { return true; }
|
|
898
|
+
wantSubEntityType(type) {
|
|
899
|
+
switch (type) {
|
|
900
|
+
case editor_common_1.SubEntityType.Face:
|
|
901
|
+
case editor_common_1.SubEntityType.Edge:
|
|
902
|
+
// Choose all faces or all edges...
|
|
903
|
+
return (0 === this._acceptedSubEntities.length || this._acceptedSubEntities[0].props.type === type);
|
|
904
|
+
default:
|
|
905
|
+
return false;
|
|
906
|
+
}
|
|
894
907
|
}
|
|
895
|
-
get wantDynamics() { return true; }
|
|
896
|
-
get wantAccuSnap() { return this.isDynamicsStarted; }
|
|
897
|
-
// TODO: Sweep open path to surface, sweep surface to solid...
|
|
898
908
|
get geometryCacheFilter() {
|
|
899
|
-
return { parts: true, curves:
|
|
909
|
+
return { parts: true, curves: true, surfaces: true, solids: true, other: false };
|
|
910
|
+
}
|
|
911
|
+
async doPickSubEntities(id, ev) {
|
|
912
|
+
const hits = await super.doPickSubEntities(id, ev);
|
|
913
|
+
if (undefined === hits)
|
|
914
|
+
return hits;
|
|
915
|
+
// Only want edges from wire bodies...
|
|
916
|
+
const accept = (editor_common_1.BRepEntityType.Wire === this.getBRepEntityTypeForSubEntity(id, hits[0].subEntity) ? editor_common_1.SubEntityType.Edge : editor_common_1.SubEntityType.Face);
|
|
917
|
+
return hits.filter((hit) => { return accept === hit.subEntity.type; });
|
|
900
918
|
}
|
|
901
919
|
async createSubEntityData(id, hit) {
|
|
902
920
|
const data = await super.createSubEntityData(id, hit);
|
|
903
|
-
|
|
904
|
-
|
|
921
|
+
// Prefer orientation from snap to take entire path curve as well as placement z into account...
|
|
922
|
+
const snap = core_frontend_1.TentativeOrAccuSnap.getCurrentSnap(false);
|
|
923
|
+
const point = (id === (snap === null || snap === void 0 ? void 0 : snap.sourceId) && snap.isHot ? snap.snapPoint : core_geometry_1.Point3d.fromJSON(hit.point));
|
|
924
|
+
const matrix = (id === (snap === null || snap === void 0 ? void 0 : snap.sourceId) ? core_frontend_1.AccuDraw.getSnapRotation(snap, undefined) : undefined);
|
|
925
|
+
const invMatrix = matrix === null || matrix === void 0 ? void 0 : matrix.inverse(); // getSnapRotation returns row matrix...
|
|
926
|
+
if (undefined !== invMatrix)
|
|
927
|
+
data.toolData = new ProfileLocationData(point, invMatrix);
|
|
928
|
+
else
|
|
929
|
+
data.toolData = new ProfileLocationData(point, undefined !== hit.normal ? core_geometry_1.Vector3d.fromJSON(hit.normal) : core_geometry_1.Vector3d.unitZ());
|
|
905
930
|
return data;
|
|
906
931
|
}
|
|
932
|
+
drawSubEntity(context, subEntity, accepted) {
|
|
933
|
+
const id = this.getCurrentElement();
|
|
934
|
+
if (undefined !== id && editor_common_1.BRepEntityType.Solid !== this.getBRepEntityTypeForSubEntity(id, subEntity.props))
|
|
935
|
+
return; // Operation will be applied to wire or sheet body, don't display sub-entity...
|
|
936
|
+
super.drawSubEntity(context, subEntity, accepted);
|
|
937
|
+
}
|
|
907
938
|
drawAcceptedSubEntities(context) {
|
|
908
939
|
var _a;
|
|
909
940
|
super.drawAcceptedSubEntities(context);
|
|
910
|
-
// Show pick point on last identified face
|
|
911
|
-
const
|
|
912
|
-
if (undefined ===
|
|
941
|
+
// Show pick point on last identified face...
|
|
942
|
+
const profileData = (_a = this.getAcceptedSubEntityData()) === null || _a === void 0 ? void 0 : _a.toolData;
|
|
943
|
+
if (undefined === profileData)
|
|
913
944
|
return;
|
|
914
945
|
const builder = context.createGraphic({ type: core_frontend_1.GraphicType.WorldOverlay });
|
|
915
946
|
builder.setSymbology(context.viewport.getContrastToBackgroundColor(), core_common_1.ColorDef.black, 10);
|
|
916
|
-
builder.addPointString([
|
|
947
|
+
builder.addPointString([profileData.point]);
|
|
917
948
|
context.addDecorationFromBuilder(builder);
|
|
918
949
|
}
|
|
950
|
+
}
|
|
951
|
+
exports.LocateFaceOrProfileTool = LocateFaceOrProfileTool;
|
|
952
|
+
/** @alpha Identify faces of solids and surfaces to translate. */
|
|
953
|
+
class SweepFacesTool extends LocateFaceOrProfileTool {
|
|
954
|
+
constructor() {
|
|
955
|
+
super(...arguments);
|
|
956
|
+
// TODO: Tool settings for sweep distance...
|
|
957
|
+
this.useDistance = false;
|
|
958
|
+
this.distance = 0.1;
|
|
959
|
+
this.addSmoothFaces = false;
|
|
960
|
+
}
|
|
961
|
+
get wantDynamics() { return true; }
|
|
962
|
+
get wantAccuSnap() { return true; }
|
|
963
|
+
get wantSubEntitySnap() { return true; }
|
|
919
964
|
async getSmoothFaces(id, face) {
|
|
920
965
|
try {
|
|
921
966
|
// NOTE: For sweep/translation, it makes sense to limit smooth to immediately adjacent...
|
|
@@ -929,10 +974,10 @@ class SweepFacesTool extends ElementGeometryTool_1.LocateSubEntityTool {
|
|
|
929
974
|
var _a;
|
|
930
975
|
if (undefined === ev.viewport || this.agenda.isEmpty || !this.haveAcceptedSubEntities)
|
|
931
976
|
return undefined;
|
|
932
|
-
const
|
|
933
|
-
if (undefined ===
|
|
977
|
+
const profileData = (_a = this.getAcceptedSubEntityData()) === null || _a === void 0 ? void 0 : _a.toolData;
|
|
978
|
+
if (undefined === profileData)
|
|
934
979
|
return undefined;
|
|
935
|
-
const path = core_geometry_1.Vector3d.createStartEnd(
|
|
980
|
+
const path = core_geometry_1.Vector3d.createStartEnd(profileData.point, ev.point);
|
|
936
981
|
if (this.useDistance && undefined === path.scaleToLength(this.distance, path))
|
|
937
982
|
return undefined;
|
|
938
983
|
if (path.magnitude() < core_geometry_1.Geometry.smallMetricDistance)
|
|
@@ -946,20 +991,24 @@ class SweepFacesTool extends ElementGeometryTool_1.LocateSubEntityTool {
|
|
|
946
991
|
requestId: `${this.toolId}:${id}`,
|
|
947
992
|
writeChanges: isAccept ? true : undefined,
|
|
948
993
|
};
|
|
949
|
-
const
|
|
994
|
+
const subEntities = this.getAcceptedSubEntities();
|
|
995
|
+
const params = { path };
|
|
996
|
+
if (editor_common_1.SubEntityType.Edge === subEntities[0].type || editor_common_1.BRepEntityType.Solid !== this.getBRepEntityTypeForSubEntity(id, subEntities[0])) {
|
|
997
|
+
return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("sweepFaces", id, params, opts);
|
|
998
|
+
}
|
|
950
999
|
if (this.addSmoothFaces) {
|
|
951
1000
|
const allSmoothFaces = [];
|
|
952
|
-
for (const face of
|
|
1001
|
+
for (const face of subEntities) {
|
|
953
1002
|
const smoothFaces = await this.getSmoothFaces(id, face);
|
|
954
1003
|
if (undefined !== smoothFaces)
|
|
955
1004
|
allSmoothFaces.push(...smoothFaces);
|
|
956
1005
|
}
|
|
957
1006
|
for (const smooth of allSmoothFaces) {
|
|
958
|
-
if (undefined ===
|
|
959
|
-
|
|
1007
|
+
if (undefined === subEntities.find((selected) => (0, ElementGeometryTool_1.isSameSubEntity)(selected, smooth)))
|
|
1008
|
+
subEntities.unshift(smooth); // Preserve last selected entry as reference face...
|
|
960
1009
|
}
|
|
961
1010
|
}
|
|
962
|
-
|
|
1011
|
+
params.faces = subEntities;
|
|
963
1012
|
return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("sweepFaces", id, params, opts);
|
|
964
1013
|
}
|
|
965
1014
|
catch (err) {
|
|
@@ -970,16 +1019,16 @@ class SweepFacesTool extends ElementGeometryTool_1.LocateSubEntityTool {
|
|
|
970
1019
|
var _a;
|
|
971
1020
|
if (!this.haveAcceptedSubEntities)
|
|
972
1021
|
return;
|
|
973
|
-
const
|
|
974
|
-
if (undefined ===
|
|
1022
|
+
const profileData = (_a = this.getAcceptedSubEntityData()) === null || _a === void 0 ? void 0 : _a.toolData;
|
|
1023
|
+
if (undefined === profileData)
|
|
975
1024
|
return;
|
|
976
1025
|
const hints = new core_frontend_1.AccuDrawHintBuilder();
|
|
977
1026
|
hints.setOriginFixed = true;
|
|
978
1027
|
hints.setLockY = true;
|
|
979
1028
|
hints.setLockZ = true;
|
|
980
1029
|
hints.setModeRectangular();
|
|
981
|
-
hints.setOrigin(
|
|
982
|
-
hints.setXAxis2(
|
|
1030
|
+
hints.setOrigin(profileData.point);
|
|
1031
|
+
hints.setXAxis2(profileData.orientation instanceof core_geometry_1.Matrix3d ? profileData.orientation.getColumn(2) : profileData.orientation);
|
|
983
1032
|
hints.sendHints(false);
|
|
984
1033
|
}
|
|
985
1034
|
async onRestartTool() {
|
|
@@ -992,28 +1041,16 @@ exports.SweepFacesTool = SweepFacesTool;
|
|
|
992
1041
|
SweepFacesTool.toolId = "SweepFaces";
|
|
993
1042
|
SweepFacesTool.iconSpec = "icon-move"; // TODO: Need better icon...
|
|
994
1043
|
/** @alpha Identify faces of solids and surfaces to revolve. */
|
|
995
|
-
class SpinFacesTool extends
|
|
1044
|
+
class SpinFacesTool extends LocateFaceOrProfileTool {
|
|
996
1045
|
constructor() {
|
|
997
1046
|
super(...arguments);
|
|
998
|
-
this.points = [];
|
|
999
1047
|
// TODO: Tool settings for sweep angle...
|
|
1000
1048
|
this.sweep = core_geometry_1.Angle.piOver2Radians;
|
|
1049
|
+
this.points = [];
|
|
1001
1050
|
}
|
|
1002
1051
|
get wantDynamics() { return true; }
|
|
1003
|
-
get wantAccuSnap() { return
|
|
1004
|
-
|
|
1005
|
-
get geometryCacheFilter() {
|
|
1006
|
-
return { parts: true, curves: false, surfaces: true, solids: true, other: false };
|
|
1007
|
-
}
|
|
1008
|
-
getSubEntityFilter() {
|
|
1009
|
-
return { nonPlanarFaces: true };
|
|
1010
|
-
}
|
|
1011
|
-
async createSubEntityData(id, hit) {
|
|
1012
|
-
const data = await super.createSubEntityData(id, hit);
|
|
1013
|
-
if (undefined !== hit.point && undefined !== hit.normal)
|
|
1014
|
-
data.toolData = FaceLocationData.create(hit.point, hit.normal);
|
|
1015
|
-
return data;
|
|
1016
|
-
}
|
|
1052
|
+
get wantAccuSnap() { return true; }
|
|
1053
|
+
get wantSubEntitySnap() { return true; }
|
|
1017
1054
|
async applyAgendaOperation(ev, isAccept) {
|
|
1018
1055
|
if (undefined === ev.viewport || this.agenda.isEmpty || !this.haveAcceptedSubEntities || this.points.length < (isAccept ? 2 : 1))
|
|
1019
1056
|
return undefined;
|
|
@@ -1031,8 +1068,12 @@ class SpinFacesTool extends ElementGeometryTool_1.LocateSubEntityTool {
|
|
|
1031
1068
|
requestId: `${this.toolId}:${id}`,
|
|
1032
1069
|
writeChanges: isAccept ? true : undefined,
|
|
1033
1070
|
};
|
|
1034
|
-
const
|
|
1035
|
-
const params = {
|
|
1071
|
+
const subEntities = this.getAcceptedSubEntities();
|
|
1072
|
+
const params = { origin, direction, angle };
|
|
1073
|
+
if (editor_common_1.SubEntityType.Edge === subEntities[0].type || editor_common_1.BRepEntityType.Solid !== this.getBRepEntityTypeForSubEntity(id, subEntities[0])) {
|
|
1074
|
+
return await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("spinFaces", id, params, opts);
|
|
1075
|
+
}
|
|
1076
|
+
params.faces = subEntities;
|
|
1036
1077
|
let result = await ElementGeometryTool_1.ElementGeometryCacheTool.callCommand("spinFaces", id, params, opts);
|
|
1037
1078
|
// Spun face can be used to create a pocket...retry with negative sweep...
|
|
1038
1079
|
if (undefined === result) {
|
|
@@ -1057,7 +1098,7 @@ class SpinFacesTool extends ElementGeometryTool_1.LocateSubEntityTool {
|
|
|
1057
1098
|
super.onDynamicFrame(ev, context);
|
|
1058
1099
|
}
|
|
1059
1100
|
async gatherInput(ev) {
|
|
1060
|
-
if (this.
|
|
1101
|
+
if (!this.wantAdditionalSubEntities)
|
|
1061
1102
|
this.points.push(ev.point.clone());
|
|
1062
1103
|
return super.gatherInput(ev);
|
|
1063
1104
|
}
|
|
@@ -1068,13 +1109,16 @@ class SpinFacesTool extends ElementGeometryTool_1.LocateSubEntityTool {
|
|
|
1068
1109
|
var _a;
|
|
1069
1110
|
if (!this.haveAcceptedSubEntities || 0 !== this.points.length)
|
|
1070
1111
|
return;
|
|
1071
|
-
const
|
|
1072
|
-
if (undefined ===
|
|
1112
|
+
const profileData = (_a = this.getAcceptedSubEntityData()) === null || _a === void 0 ? void 0 : _a.toolData;
|
|
1113
|
+
if (undefined === profileData)
|
|
1073
1114
|
return;
|
|
1074
1115
|
const hints = new core_frontend_1.AccuDrawHintBuilder();
|
|
1075
1116
|
hints.setModeRectangular();
|
|
1076
|
-
hints.setOrigin(
|
|
1077
|
-
|
|
1117
|
+
hints.setOrigin(profileData.point);
|
|
1118
|
+
if (profileData.orientation instanceof core_geometry_1.Matrix3d)
|
|
1119
|
+
hints.setMatrix(profileData.orientation);
|
|
1120
|
+
else
|
|
1121
|
+
hints.setNormal(profileData.orientation);
|
|
1078
1122
|
hints.sendHints(false);
|
|
1079
1123
|
}
|
|
1080
1124
|
async onRestartTool() {
|