mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
Renamed all feature files to format fetureName.operation.ts
This commit is contained in:
parent
2d16fdba4e
commit
04ac5bb994
10 changed files with 67 additions and 9 deletions
|
|
@ -0,0 +1,46 @@
|
|||
import { roundValueForPresentation as r } from 'cad/craft/operationHelper';
|
||||
import { MFace } from "cad/model/mface";
|
||||
import { MShell } from "cad/model/mshell";
|
||||
import { ApplicationContext } from "context";
|
||||
import { EntityKind } from "cad/model/entities";
|
||||
import { BooleanDefinition } from "cad/craft/schema/common/BooleanDefinition";
|
||||
import { UnitVector } from "math/vector";
|
||||
import { OperationDescriptor } from "cad/craft/operationPlugin";
|
||||
import { MObject } from "cad/model/mobject";
|
||||
|
||||
|
||||
interface getVolumeParams {
|
||||
targetBody: MShell;
|
||||
}
|
||||
|
||||
export const GetVolume: OperationDescriptor<getVolumeParams> = {
|
||||
id: 'EXTRUDE',
|
||||
label: 'Extrude',
|
||||
icon: 'img/cad/extrude',
|
||||
info: 'extrudes 2D sketch',
|
||||
run: (params: getVolumeParams, ctx: ApplicationContext) => {
|
||||
|
||||
let occ = ctx.occService;
|
||||
const oci = occ.commandInterface;
|
||||
|
||||
alert();
|
||||
|
||||
return;
|
||||
},
|
||||
|
||||
|
||||
|
||||
form: [
|
||||
{
|
||||
type: 'selection',
|
||||
name: 'targetBody',
|
||||
capture: [EntityKind.SHELL],
|
||||
label: 'Body',
|
||||
multi: false,
|
||||
defaultValue: {
|
||||
usePreselection: true,
|
||||
preselectionIndex: 0
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
import { WorkbenchConfig } from "cad/workbench/workbenchService";
|
||||
|
||||
//imports of feature history type commands
|
||||
import { PrimitiveBoxOperation } from './features/primitiveBox/primitiveBox.operation';
|
||||
import { ExtrudeOperation } from './features/extrude/extrude.operation';
|
||||
import { LoftOperation } from './features/loft/loft.operation'
|
||||
import { WorkbenchConfig } from "cad/workbench/workbenchService";
|
||||
import { PrimitiveBoxOperation } from "./features/primitiveBox";
|
||||
import { PrimitiveConeOperation } from "./features/primitiveCone";
|
||||
import { PrimitiveCylinderOperation } from "./features/primitiveCylinder";
|
||||
import { PrimitiveSphereOperation } from "./features/primitiveSphere";
|
||||
import { PrimitiveTorusOperation } from "./features/primitiveTorus/index";
|
||||
import { HoleOperation } from "./features/hole";
|
||||
import { FilletOperation } from "./features/fillet";
|
||||
import { PrimitiveConeOperation } from "./features/primitiveCone/PrimitiveCone.operation";
|
||||
import { PrimitiveCylinderOperation } from "./features/primitiveCylinder/PrimitiveCylinder.operation";
|
||||
import { PrimitiveSphereOperation } from "./features/primitiveSphere/PrimitiveSphere.operation";
|
||||
import { PrimitiveTorusOperation } from "./features/primitiveTorus/PrimitiveTorus.operation";
|
||||
import { HoleOperation } from "./features/hole/Hole.operation";
|
||||
import { FilletOperation } from "./features/fillet/fillet.operation";
|
||||
import { BooleanOperation } from "./features/boolean/boolean.operation";
|
||||
import { RevolveOperation } from "./features/revolve/revolve.operation";
|
||||
import { ShellOperation } from "./features/shell/shell.operation";
|
||||
|
|
@ -15,6 +17,10 @@ import { SweepOperation } from "./features/sweep/sweep.operation";
|
|||
import { offsetOperation } from "./features/offsetFace/offsetFace.operation";
|
||||
import { MirrorBodyOperation} from "./features/mirrorBody/mirrorBody.operation";
|
||||
|
||||
//imports of action type commands
|
||||
import { GetVolume } from './actions/getVolume/getVolume.action';
|
||||
|
||||
|
||||
export const ModelerWorkspace: WorkbenchConfig = {
|
||||
|
||||
workbenchId: 'modeler',
|
||||
|
|
@ -35,7 +41,7 @@ export const ModelerWorkspace: WorkbenchConfig = {
|
|||
offsetOperation,
|
||||
MirrorBodyOperation
|
||||
],
|
||||
actions: [],
|
||||
actions: [GetVolume],
|
||||
ui: {
|
||||
toolbar: [
|
||||
'DATUM_CREATE', 'PLANE', 'EditFace', '-',
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
import { WorkbenchConfig } from "cad/workbench/workbenchService";
|
||||
|
||||
//imports of feature history type commands
|
||||
import { smTabOperation } from "./features/smTab/smTab.operation";
|
||||
import { smFlangeOperation } from "./features/smFlange/smFlange.operation";
|
||||
|
||||
|
||||
//imports of action type commands
|
||||
|
||||
|
||||
|
||||
export const sheetMetalWorkspace: WorkbenchConfig = {
|
||||
|
||||
workbenchId: 'SheetMetal',
|
||||
|
|
|
|||
Loading…
Reference in a new issue