diff --git a/modules/workbenches/modeler/features/primitive_box/index.ts b/modules/workbenches/modeler/features/primitive_box/index.ts index 2c905a18..c2a01dcd 100644 --- a/modules/workbenches/modeler/features/primitive_box/index.ts +++ b/modules/workbenches/modeler/features/primitive_box/index.ts @@ -11,16 +11,31 @@ export default { info: 'primitive_box', mutualExclusiveFields: [], paramsInfo: ({ boxX, boxY, boxZ }) => `(${r(boxX)} ${r(boxY)}) ${r(boxZ)})`, + schema: { + boxX: { + type: 'number', + defaultValue: 200, + label: 'X' + }, + boxY: { + type: 'number', + defaultValue: 280, + label: 'Y' + }, + boxZ: { + type: 'number', + defaultValue: 280, + label: 'Z' + }, + }, + + run: ({ boxX, boxY, boxZ }, ctx: ApplicationContext) => { //const occObj = createCylinder(diameter, height, ctx.occService.occContext); const oc = ctx.occService.occContext; - //const myLocation = new oc.gp_Pnt_3(0, 0, 0); - //const cylinderCenterline = oc.gp.DZ(); - //const cylinderOrientationAndLocation = new oc.gp_Ax2_3(myLocation, cylinderCenterline); - console.log(boxX, boxY, boxZ, oc.BRepPrimAPI_MakeBox_1(boxX, boxY, boxZ)) - let myBody = new oc.BRepPrimAPI_MakeBox_1(boxX, boxY, boxZ ); + let myBody = new oc.BRepPrimAPI_MakeBox_1(boxX, boxY, boxZ); //let myBody = new oc.BRepPrimAPI_Make const aRes = new oc.TopoDS_Compound(); @@ -36,22 +51,6 @@ export default { created: [mobject] }; }, - schema: { - boxX: { - type: 'number', - defaultValue: 200, - label: 'X' - }, - boxY: { - type: 'number', - defaultValue: 280, - label: 'Y' - }, - BoxZ: { - type: 'number', - defaultValue: 280, - label: 'Z' - }, - } + }