Slight refactor box primitive

This commit is contained in:
Mike Molinari 2021-09-23 03:09:48 +00:00 committed by GitHub
parent 12ebf17588
commit 79e25c02c9

View file

@ -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'
},
}
}