diff --git a/modules/workbenches/modeler/features/deleteBody/deleteBody.operation.ts b/modules/workbenches/modeler/features/deleteBody/deleteBody.operation.ts index 1635e63f..da53a419 100644 --- a/modules/workbenches/modeler/features/deleteBody/deleteBody.operation.ts +++ b/modules/workbenches/modeler/features/deleteBody/deleteBody.operation.ts @@ -11,7 +11,7 @@ interface DeleteBodyParams { export const DeleteBodyOperation: OperationDescriptor = { id: 'DELETE_BODY', label: 'DeleteBody', - icon: 'img/cad/intersection', + icon: 'img/cad/deleteBody', info: 'Delete Bodies', paramsInfo: ({ tools, DeleteBody }) => `(${r(tools)} ${r(DeleteBody)})`, run: (params: DeleteBodyParams, ctx: ApplicationContext) => { diff --git a/modules/workbenches/modeler/features/patternLinear/patternLinear.operation.ts b/modules/workbenches/modeler/features/patternLinear/patternLinear.operation.ts index 32e19182..d36f8679 100644 --- a/modules/workbenches/modeler/features/patternLinear/patternLinear.operation.ts +++ b/modules/workbenches/modeler/features/patternLinear/patternLinear.operation.ts @@ -7,8 +7,6 @@ import { UnitVector } from "math/vector"; import { OperationDescriptor } from "cad/craft/operationPlugin"; import { MShell } from 'cad/model/mshell'; import { MDatum } from "cad/model/mdatum"; -import {Matrix3x4} from "math/matrix"; -import {SetLocation} from "cad/craft/e0/interact"; interface patternLinearParams { inputBodies: MShell[]; @@ -33,23 +31,15 @@ export const PatternLinearOperation: OperationDescriptor = let created = []; + const newDatum = new MDatum({}); + console.log(newDatum); + params.inputBodies.forEach((shellToPatern, index) => { - for (let i = 2; i <= params.qty; i++) { - let distanceForInstance = 0; - if(params.patternMethod == 'Step Distance') distanceForInstance =params.distance*(i-1); - if(params.patternMethod == 'Span Distance') distanceForInstance =(params.distance / (params.qty-1))*(i-1); - - const trVec = params.direction.multiply(distanceForInstance); - - const tr = new Matrix3x4().setTranslation(trVec.x, trVec.y, trVec.z); - - const newShellName = shellToPatern.id + ":patern/" + index + "/" +i; - oci.copy(shellToPatern, newShellName); - SetLocation(newShellName, tr.toFlatArray()); - - created.push(occ.io.getShell(newShellName)); - } - + const newShellName = shellToPatern.id + ":patern" + index; + oci.copy(shellToPatern, newShellName); + //oci.step(); + //oci.tmirror(newShellName, ...params.face.csys.origin.data(), ...params.face.csys.z.normalize().data()); + created.push(occ.io.getShell(newShellName)); }); return { diff --git a/web/img/cad/deleteBody32.png b/web/img/cad/deleteBody32.png index ad92ed1f..0ae208f3 100644 Binary files a/web/img/cad/deleteBody32.png and b/web/img/cad/deleteBody32.png differ diff --git a/web/img/cad/deleteBody96.png b/web/img/cad/deleteBody96.png index ad92ed1f..0ae208f3 100644 Binary files a/web/img/cad/deleteBody96.png and b/web/img/cad/deleteBody96.png differ