From 7a82a75d2c109004fcf0688e060b25958a95642f Mon Sep 17 00:00:00 2001 From: James Lindsay <78500760+0HyperCube@users.noreply.github.com> Date: Sat, 6 Jul 2024 09:26:00 +0100 Subject: [PATCH] Fix multi-subpath boolean operations (#1804) Fix multi subpath boolean operations --- frontend/src/utility-functions/computational-geometry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/utility-functions/computational-geometry.ts b/frontend/src/utility-functions/computational-geometry.ts index 922ada78..80bb8cec 100644 --- a/frontend/src/utility-functions/computational-geometry.ts +++ b/frontend/src/utility-functions/computational-geometry.ts @@ -25,8 +25,8 @@ export function booleanDivide(path1: string, path2: string): string { } function booleanOperation(path1: string, path2: string, operation: "unite" | "subtract" | "intersect" | "exclude"): string { - const paperPath1 = new paper.Path(path1); - const paperPath2 = new paper.Path(path2); + const paperPath1 = new paper.CompoundPath(path1); + const paperPath2 = new paper.CompoundPath(path2); const result = paperPath1[operation](paperPath2); paperPath1.remove(); paperPath2.remove();