mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
Move sheet metal commands to sheet metal workbench
This commit is contained in:
parent
ebce277697
commit
d0756e3be8
6 changed files with 28 additions and 7 deletions
|
|
@ -13,8 +13,6 @@ import { RevolveOperation } from "./features/revolve/revolve.operation";
|
||||||
import { ShellOperation } from "./features/shell/shell.operation";
|
import { ShellOperation } from "./features/shell/shell.operation";
|
||||||
import { SweepOperation } from "./features/sweep/sweep.operation";
|
import { SweepOperation } from "./features/sweep/sweep.operation";
|
||||||
import { offsetOperation } from "./features/offsetFace/offsetFace.operation";
|
import { offsetOperation } from "./features/offsetFace/offsetFace.operation";
|
||||||
import { smTabOperation } from "./features/smTab/smTab.operation";
|
|
||||||
import { smFlangeOperation } from "./features/smFlange/smFlange.operation";
|
|
||||||
import { MirrorBodyOperation} from "./features/mirrorBody/mirrorBody.operation";
|
import { MirrorBodyOperation} from "./features/mirrorBody/mirrorBody.operation";
|
||||||
|
|
||||||
export const ModelerWorkspace: WorkbenchConfig = {
|
export const ModelerWorkspace: WorkbenchConfig = {
|
||||||
|
|
@ -35,8 +33,6 @@ export const ModelerWorkspace: WorkbenchConfig = {
|
||||||
LoftOperation,
|
LoftOperation,
|
||||||
SweepOperation,
|
SweepOperation,
|
||||||
offsetOperation,
|
offsetOperation,
|
||||||
smTabOperation,
|
|
||||||
smFlangeOperation,
|
|
||||||
MirrorBodyOperation
|
MirrorBodyOperation
|
||||||
],
|
],
|
||||||
actions: [],
|
actions: [],
|
||||||
|
|
@ -48,7 +44,6 @@ export const ModelerWorkspace: WorkbenchConfig = {
|
||||||
"SHELL_TOOL", "FILLET_TOOL", "OFFSET_TOOL", "MIRROR_BODY", "-",
|
"SHELL_TOOL", "FILLET_TOOL", "OFFSET_TOOL", "MIRROR_BODY", "-",
|
||||||
"CYLINDER", "BOX", "CONE", "SPHERE", "TORUS", "-",
|
"CYLINDER", "BOX", "CONE", "SPHERE", "TORUS", "-",
|
||||||
"HOLE_TOOL", "-",
|
"HOLE_TOOL", "-",
|
||||||
"SM_TAB","SM_FLANGE"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import {ModelerWorkspace} from "workbenches/modeler";
|
import {ModelerWorkspace} from "workbenches/modeler";
|
||||||
import {ExampleWorkspace} from "workbenches/examples";
|
import { sheetMetalWorkspace } from "workbenches/sheetMetal";
|
||||||
import {WorkbenchConfig} from "cad/workbench/workbenchService";
|
import {WorkbenchConfig} from "cad/workbench/workbenchService";
|
||||||
|
|
||||||
|
|
||||||
export const WorkbenchRegistry: WorkbenchConfig[] = [
|
export const WorkbenchRegistry: WorkbenchConfig[] = [
|
||||||
ModelerWorkspace,
|
ModelerWorkspace, sheetMetalWorkspace
|
||||||
]
|
]
|
||||||
25
modules/workbenches/sheetMetal/index.ts
Normal file
25
modules/workbenches/sheetMetal/index.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { WorkbenchConfig } from "cad/workbench/workbenchService";
|
||||||
|
import { smTabOperation } from "./features/smTab/smTab.operation";
|
||||||
|
import { smFlangeOperation } from "./features/smFlange/smFlange.operation";
|
||||||
|
|
||||||
|
|
||||||
|
export const sheetMetalWorkspace: WorkbenchConfig = {
|
||||||
|
|
||||||
|
workbenchId: 'SheetMetal',
|
||||||
|
features: [
|
||||||
|
smTabOperation,
|
||||||
|
smFlangeOperation,
|
||||||
|
|
||||||
|
],
|
||||||
|
actions: [],
|
||||||
|
ui: {
|
||||||
|
toolbar: [
|
||||||
|
'DATUM_CREATE', 'PLANE', 'EditFace', '-',
|
||||||
|
"EXTRUDE", "-",
|
||||||
|
"BOOLEAN", "-",
|
||||||
|
"FILLET_TOOL", "MIRROR_BODY", "-",
|
||||||
|
"HOLE_TOOL", "-",
|
||||||
|
"SM_TAB","SM_FLANGE"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -59,6 +59,7 @@ export function createOCCUtils(ctx: CoreContext): OCCUtils {
|
||||||
targets = ctx.cadRegistry.shells;
|
targets = ctx.cadRegistry.shells;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let targetNames = targets.map((target, i) => {
|
let targetNames = targets.map((target, i) => {
|
||||||
const targetName = 'Target/' + i;
|
const targetName = 'Target/' + i;
|
||||||
const wasPushed = ctx.occService.io.pushModel(target, targetName);
|
const wasPushed = ctx.occService.io.pushModel(target, targetName);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue