From 4f9b19b1b6cfeafd9e3cf06fa2a4642766738694 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Wed, 4 Mar 2026 23:12:57 -0500 Subject: [PATCH 01/21] add the new library to the CI --- build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 37fe267e..1f17cad4 100644 --- a/build.gradle +++ b/build.gradle @@ -63,6 +63,7 @@ task sourcesJar(type: Jar) { repositories { mavenCentral() mavenLocal() + maven { url "https://clojars.org/repo" } } // javadoc is way too strict for my taste. @@ -119,8 +120,11 @@ dependencies { implementation 'com.aparapi:aparapi:3.0.2' //SSL for server -implementation 'org.bouncycastle:bcprov-jdk18on:1.80' -implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' + implementation 'org.bouncycastle:bcprov-jdk18on:1.80' + implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' + + //manifold 3d + implementation("com.github.madhephaestus:manifold3d:2.1.0") } From 808d22336a1813cfaf5ee2e6bcde52c959c36c30 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Thu, 5 Mar 2026 14:06:14 -0500 Subject: [PATCH 02/21] basic build test --- build.gradle | 2 +- .../java/eu/mihosoft/vrl/v3d/Manifold3d_test.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java diff --git a/build.gradle b/build.gradle index 1f17cad4..eb2b7411 100644 --- a/build.gradle +++ b/build.gradle @@ -124,7 +124,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:2.1.0") + implementation("com.github.madhephaestus:manifold3d:3.0.2") } diff --git a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java new file mode 100644 index 00000000..66f88ed2 --- /dev/null +++ b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java @@ -0,0 +1,11 @@ +package eu.mihosoft.vrl.v3d; + +import org.junit.Test; +import manifold3d.Manifold; + +public class Manifold3d_test { + @Test + public void loadTest() { + Manifold sphere = Manifold3d.Sphere(10.0f, 20); + } +} From 58665dcf0310d6bdb59134dd100948396303c0df Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Thu, 5 Mar 2026 14:19:57 -0500 Subject: [PATCH 03/21] updating to the latest version from clojar --- build.gradle | 2 +- src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index eb2b7411..706bd886 100644 --- a/build.gradle +++ b/build.gradle @@ -124,7 +124,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:3.0.2") + implementation("com.github.madhephaestus:manifold3d:3.0.4") } diff --git a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java index 66f88ed2..e826660e 100644 --- a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java +++ b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java @@ -6,6 +6,6 @@ public class Manifold3d_test { @Test public void loadTest() { - Manifold sphere = Manifold3d.Sphere(10.0f, 20); + Manifold sphere = Manifold.Sphere(10.0f, 20); } } From b83ee368ec04fb4bfaf34b327bb4759715d04eea Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Fri, 6 Mar 2026 09:25:41 -0500 Subject: [PATCH 04/21] update tbb dep handeling --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 706bd886..ee18db02 100644 --- a/build.gradle +++ b/build.gradle @@ -124,7 +124,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:3.0.4") + implementation("com.github.madhephaestus:manifold3d:3.0.7") } From 50117bdd9ace15e126b899eb3327920f622db976 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 15 Mar 2026 10:57:27 -0400 Subject: [PATCH 05/21] update Manifold to use the bindings --- build.gradle | 53 ++++++------------- .../eu/mihosoft/vrl/v3d/Manifold3d_test.java | 8 +-- 2 files changed, 21 insertions(+), 40 deletions(-) diff --git a/build.gradle b/build.gradle index ee18db02..a4212ff9 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,10 @@ plugins { id 'signing' //id 'io.codearte.nexus-staging' version '0.30.0' } - +java { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 +} File buildDir = file("."); Properties props = new Properties() props.load(new FileInputStream(buildDir.getAbsolutePath()+"/src/main/resources/com/neuronrobotics/javacad/build.properties")) @@ -14,41 +17,7 @@ group = "com.neuronrobotics" archivesBaseName = "JavaCad" version = props."app.version" -// BEGIN AI SLOP - -//nexusStaging { -// serverUrl = "https://oss.sonatype.org/service/local/" -// username = System.getenv("MAVEN_USERNAME") -// password = System.getenv("MAVEN_PASSWORD") -// packageGroup = "com.neuronrobotics" // Replace with your actual package group -//} - -//task closeAndReleaseSeparately { -// dependsOn tasks.releaseRepository -//} - -//tasks.releaseRepository.dependsOn tasks.closeRepository -//tasks.closeRepository.dependsOn tasks.getStagingProfile - -// Optional: Add this if you want to see more information during the execution -//tasks.getStagingProfile.logging.level = LogLevel.INFO -//tasks.closeRepository.logging.level = LogLevel.INFO -//tasks.releaseRepository.logging.level = LogLevel.INFO - -//tasks.getStagingProfile.doFirst { -// println "Executing getStagingProfile task" -//} - -//tasks.closeRepository.doFirst { -// println "Executing closeRepository task" -//} -// -//tasks.releaseRepository.doFirst { -// println "Executing releaseRepository task" -//} - -// END AI SLOP -sourceCompatibility = '1.8' + [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' //apply from: 'http://gradle-plugins.mihosoft.eu/latest/vlicenseheader.gradle' @@ -124,7 +93,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:3.0.7") + implementation("com.github.madhephaestus:manifold3d:3.2.1") } @@ -134,7 +103,17 @@ ext { buildTime = new java.text.SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate) } +tasks.withType(JavaCompile).configureEach { + options.compilerArgs += ['--enable-preview'] +} + +tasks.withType(Test).configureEach { + jvmArgs '--enable-preview' +} +tasks.withType(JavaExec).configureEach { + jvmArgs '--enable-preview' +} test { testLogging { // Show which test is running diff --git a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java index e826660e..4e8fcd76 100644 --- a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java +++ b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java @@ -1,11 +1,13 @@ package eu.mihosoft.vrl.v3d; import org.junit.Test; -import manifold3d.Manifold; + +import com.cadoodlecad.manifold.ManifoldBindings; public class Manifold3d_test { @Test - public void loadTest() { - Manifold sphere = Manifold.Sphere(10.0f, 20); + public void loadTest() throws Exception { + ManifoldBindings manifold = new ManifoldBindings(); + } } From 188cfaae209f1069e331d07e92e8e70383208a71 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 15 Mar 2026 12:23:36 -0400 Subject: [PATCH 06/21] cleanup --- .github/workflows/verify.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 1721770f..582eb55f 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -42,9 +42,6 @@ jobs: - name: Pull a JavaFX JDK run: wget https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-fx-jdk21.0.9-linux_aarch64.tar.gz - - name: After JDK download, list directory contents - run: pwd; ls -la - - name: Set Java uses: actions/setup-java@v1 with: @@ -119,9 +116,6 @@ jobs: - name: Pull a JavaFX JDK run: wget https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-fx-jdk21.0.9-linux_x64.tar.gz - - name: After JDK download, list directory contnts - run: pwd; ls -la - - name: Set Java uses: actions/setup-java@v1 with: From e31d949359c5900eabea594c4596afe358d7b5c5 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 15 Mar 2026 14:07:30 -0400 Subject: [PATCH 07/21] Should pass all archetectures --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a4212ff9..7b1af409 100644 --- a/build.gradle +++ b/build.gradle @@ -93,7 +93,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:3.2.1") + implementation("com.github.madhephaestus:manifold3d:3.2.3-99015273-SNAPSHOT") } From ec851c9212749db72452ac7b842d111b15eea3e5 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 15 Mar 2026 14:46:40 -0400 Subject: [PATCH 08/21] Update the snapshot to include the java fix for arm platforms --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7b1af409..239a0982 100644 --- a/build.gradle +++ b/build.gradle @@ -93,7 +93,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:3.2.3-99015273-SNAPSHOT") + implementation("com.github.madhephaestus:manifold3d:3.2.3-89588463-SNAPSHOT") } From ab8047173da063dce5d1d261ea20bb808cafd98b Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 15 Mar 2026 14:57:27 -0400 Subject: [PATCH 09/21] use the first version built entirely in CI --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 239a0982..03c17f31 100644 --- a/build.gradle +++ b/build.gradle @@ -93,7 +93,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:3.2.3-89588463-SNAPSHOT") + implementation("com.github.madhephaestus:manifold3d:3.2.4") } From 18d74cf8f04ea84f6eacae0b7ff97536cb6bf4f8 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 15 Mar 2026 15:32:59 -0400 Subject: [PATCH 10/21] Updating to the ci build lib name standard --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 03c17f31..eb81fab7 100644 --- a/build.gradle +++ b/build.gradle @@ -93,7 +93,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:3.2.4") + implementation("com.github.madhephaestus:manifold3d:3.2.7") } From f973d01da1389eb98465ad9c452fa8ad1255bfcb Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 15 Mar 2026 15:50:53 -0400 Subject: [PATCH 11/21] update to the new windows build version --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index eb81fab7..5b7962a2 100644 --- a/build.gradle +++ b/build.gradle @@ -93,7 +93,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:3.2.7") + implementation("com.github.madhephaestus:manifold3d:3.2.11") } From c9736d34955f1ac3e6a067ab9e176bf2cac45ca5 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 15 Mar 2026 17:41:21 -0400 Subject: [PATCH 12/21] updaing to the lates CI build release --- build.gradle | 2 +- src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 5b7962a2..73aaec6f 100644 --- a/build.gradle +++ b/build.gradle @@ -93,7 +93,7 @@ dependencies { implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' //manifold 3d - implementation("com.github.madhephaestus:manifold3d:3.2.11") + implementation("com.github.madhephaestus:manifold3d:3.2.16") } diff --git a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java index 4e8fcd76..7c94fc05 100644 --- a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java +++ b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java @@ -1,13 +1,15 @@ package eu.mihosoft.vrl.v3d; +import java.lang.foreign.MemorySegment; + import org.junit.Test; import com.cadoodlecad.manifold.ManifoldBindings; public class Manifold3d_test { @Test - public void loadTest() throws Exception { + public void loadTest() throws Throwable { ManifoldBindings manifold = new ManifoldBindings(); - + MemorySegment cube = manifold.cube(10, 10, 10, false); } } From 9e9a784ff0cd3862e51b66bce5cbc136d3c9fb26 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 16 Mar 2026 10:38:10 -0400 Subject: [PATCH 13/21] set up the option type for JCSG --- src/main/java/eu/mihosoft/vrl/v3d/CSG.java | 14 ++++++++++++++ .../java/eu/mihosoft/vrl/v3d/Manifold3d_test.java | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java index fc5cdf70..46898c5d 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java @@ -69,6 +69,7 @@ import com.aparapi.device.Device; import com.aparapi.internal.kernel.KernelManager; import com.aparapi.internal.kernel.KernelRunner; +import com.cadoodlecad.manifold.ManifoldBindings; import com.neuronrobotics.interaction.CadInteractionEvent; import javafx.scene.paint.Color; @@ -199,6 +200,7 @@ public void progressUpdate(int currentIndex, int finalIndex, String type, CSG in private int pointsAdded; private String uniqueId = UUID.randomUUID().toString(); + private static ManifoldBindings manifold=null; /** * Instantiates a new csg. @@ -2715,6 +2717,15 @@ protected OptType getOptType() { * @param optType the optType to set */ public static void setDefaultOptType(OptType optType) { + if(optType == OptType.Manifold3d) { + try { + manifold = new ManifoldBindings(); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + optType=defaultOptType; + } + } defaultOptType = optType; } @@ -2724,6 +2735,7 @@ public static void setDefaultOptType(OptType optType) { * @param optType the optType to set */ public CSG setOptType(OptType optType) { + this.optType = optType; return this; } @@ -2750,6 +2762,8 @@ public static enum OptType { /** The polygon bound. */ POLYGON_BOUND, + + Manifold3d, /** The none. */ NONE diff --git a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java index 7c94fc05..08332827 100644 --- a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java +++ b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java @@ -6,10 +6,12 @@ import com.cadoodlecad.manifold.ManifoldBindings; +import eu.mihosoft.vrl.v3d.CSG.OptType; + public class Manifold3d_test { @Test public void loadTest() throws Throwable { - ManifoldBindings manifold = new ManifoldBindings(); - MemorySegment cube = manifold.cube(10, 10, 10, false); + CSG.setDefaultOptType(OptType.Manifold3d); + } } From aba1e332a56d880dc0a2f71297c1084a95728689 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 16 Mar 2026 10:58:47 -0400 Subject: [PATCH 14/21] add all of the stubs for basic operations --- src/main/java/eu/mihosoft/vrl/v3d/CSG.java | 22 ++++++++++++++++++- .../vrl/v3d/ext/quickhull3d/HullUtil.java | 4 ++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java index 46898c5d..e3161a16 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java @@ -870,6 +870,8 @@ public CSG union(CSG csg) { return _unionCSGBoundsOpt(csg).historySync(this).historySync(csg); case POLYGON_BOUND: return _unionPolygonBoundsOpt(csg).historySync(this).historySync(csg); + case Manifold3d: + new RuntimeException("Not implemented yet").printStackTrace(); default: // return _unionIntersectOpt(csg); return _unionNoOpt(csg).historySync(this).historySync(csg); @@ -1381,13 +1383,15 @@ public CSG difference(CSG csg) { return _differenceCSGBoundsOpt(csg).historySync(this).historySync(csg); case POLYGON_BOUND: return _differencePolygonBoundsOpt(csg).historySync(this).historySync(csg); + case Manifold3d: + new RuntimeException("Not implemented yet").printStackTrace(); default: return _differenceNoOpt(csg).historySync(this).historySync(csg); } } else return this; } catch (Exception ex) { - // ex.printStackTrace(); + ex.printStackTrace(); try { // com.neuronrobotics.sdk.common.Log.error("CSG difference failed, performing // workaround"); @@ -1402,6 +1406,8 @@ public CSG difference(CSG csg) { case POLYGON_BOUND: return _differencePolygonBoundsOpt(intersectingParts).historySync(this) .historySync(intersectingParts); + case Manifold3d: + new RuntimeException("Not implemented yet").printStackTrace(); default: return _differenceNoOpt(intersectingParts).historySync(this).historySync(intersectingParts); } @@ -2720,6 +2726,15 @@ public static void setDefaultOptType(OptType optType) { if(optType == OptType.Manifold3d) { try { manifold = new ManifoldBindings(); + Slice.setSliceEngine(new ISlice() { + + @Override + public List slice(CSG incoming, Transform slicePlane, double normalInsetDistance) + throws ColinearPointsException { + new RuntimeException("Manifold3d not implemented yet").printStackTrace(); + return new ArrayList(); + } + }); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -4152,4 +4167,9 @@ public String getUniqueId() { return uniqueId; } + public static OptType getDefaultOptionType() { + // TODO Auto-generated method stub + return defaultOptType; + } + } diff --git a/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java b/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java index 5d886cf6..430930be 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java @@ -6,6 +6,7 @@ package eu.mihosoft.vrl.v3d.ext.quickhull3d; import eu.mihosoft.vrl.v3d.CSG; +import eu.mihosoft.vrl.v3d.CSG.OptType; import eu.mihosoft.vrl.v3d.CSGClient; import eu.mihosoft.vrl.v3d.ColinearPointsException; import eu.mihosoft.vrl.v3d.Vector3d; @@ -71,6 +72,9 @@ public static CSG hull(List points, PropertyStorage storage) { e.printStackTrace(); } } + if(CSG.getDefaultOptionType()==OptType.Manifold3d) { + new RuntimeException("Not implemented yet").printStackTrace(); + } Point3d[] hullPoints = points.stream().map((vec) -> new Point3d(vec.x, vec.y, vec.z)).toArray(Point3d[]::new); QuickHull3D hull = new QuickHull3D(); From a6ab6df96ae2e88094a26fb9f91447f798e0f003 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 16 Mar 2026 11:38:41 -0400 Subject: [PATCH 15/21] adding the stubs for the STL loading/export path --- src/main/java/eu/mihosoft/vrl/v3d/CSG.java | 3 +++ src/main/java/eu/mihosoft/vrl/v3d/ext/imagej/STLLoader.java | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java index e3161a16..37002d53 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java @@ -1682,6 +1682,9 @@ public String toStlString() { * @return the specified string builder */ public StringBuilder toStlString(StringBuilder sb) { + if(defaultOptType == OptType.Manifold3d) { + new RuntimeException("Manifold3d STL export not implemented yet").printStackTrace(); + } triangulate(false); try { sb.append("solid v3d.csg\n"); diff --git a/src/main/java/eu/mihosoft/vrl/v3d/ext/imagej/STLLoader.java b/src/main/java/eu/mihosoft/vrl/v3d/ext/imagej/STLLoader.java index a8f6a142..392074e2 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/ext/imagej/STLLoader.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/ext/imagej/STLLoader.java @@ -19,6 +19,8 @@ import java.util.ArrayList; import java.util.List; +import eu.mihosoft.vrl.v3d.CSG; +import eu.mihosoft.vrl.v3d.CSG.OptType; import eu.mihosoft.vrl.v3d.ColinearPointsException; import eu.mihosoft.vrl.v3d.Plane; import eu.mihosoft.vrl.v3d.Polygon; @@ -50,6 +52,9 @@ public STLLoader() { * @throws IOException Signals that an I/O exception has occurred. */ public ArrayList parse(File f) throws IOException { + if(CSG.getDefaultOptionType()==OptType.Manifold3d) { + new RuntimeException("Manifold3d STL import not implemented yet").printStackTrace(); + } ArrayList polygons = new ArrayList<>(); // determine if this is a binary or ASCII STL From 8dccebcbca80c795267e14003e2602034263bdb3 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 16 Mar 2026 11:43:09 -0400 Subject: [PATCH 16/21] Adding stubs for 3mf loader/export --- src/main/java/eu/mihosoft/vrl/v3d/CSG.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java index 37002d53..b2324601 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java @@ -42,6 +42,7 @@ import eu.mihosoft.vrl.v3d.parametrics.LengthParameter; import eu.mihosoft.vrl.v3d.parametrics.Parameter; +import java.io.File; import java.io.IOException; import java.io.Serializable; import java.lang.reflect.Field; @@ -1673,7 +1674,23 @@ public String toStlString() { toStlString(sb); return sb.toString(); } - + + public CSG to3mf(File target) { + if(defaultOptType == OptType.Manifold3d) { + new RuntimeException("Manifold3d 3mf export not implemented yet").printStackTrace(); + }else { + throw new RuntimeException("Non-Manifold3d 3mf export not implemented yet"); + } + return this; + } + public static CSG loadFrom3mf(File target) { + if(defaultOptType == OptType.Manifold3d) { + new RuntimeException("Manifold3d 3mf export not implemented yet").printStackTrace(); + }else { + throw new RuntimeException("Non-Manifold3d 3mf export not implemented yet"); + } + return null; + } /** * Returns this csg in STL string format. * From 954491a4278467967ecabf6ccea35ff0544b1527 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 16 Mar 2026 11:48:59 -0400 Subject: [PATCH 17/21] make sure the test leaves the operation in standard statee --- .../java/eu/mihosoft/vrl/v3d/Manifold3d_test.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java index 08332827..96127e21 100644 --- a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java +++ b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java @@ -11,7 +11,18 @@ public class Manifold3d_test { @Test public void loadTest() throws Throwable { - CSG.setDefaultOptType(OptType.Manifold3d); - + OptType og = CSG.getDefaultOptionType(); + + try { + CSG.setDefaultOptType(OptType.Manifold3d); + + } catch (Throwable t) { + t.printStackTrace(); + // Set back to default to complete test and not disrupt other tests + CSG.setDefaultOptType(og); + throw t; + } + // Set back to default to complete test and not disrupt other tests + CSG.setDefaultOptType(og); } } From fc38693fa03bfcfd6c025b47efdcce90b8313e07 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 16 Mar 2026 11:59:14 -0400 Subject: [PATCH 18/21] adding the intersect variant to manifold --- src/main/java/eu/mihosoft/vrl/v3d/CSG.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java index b2324601..bfbd9b63 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java @@ -1548,13 +1548,16 @@ public CSG intersect(CSG csg) { e.printStackTrace(); } } -// triangulate(); -// csg.triangulate(); + if (getPolygons().size() == 0 || csg.getPolygons().size() == 0) { Exception ex = new Exception("Error! Intersection is invalid when one CSG has no polygons!"); ex.printStackTrace(); return CSG.fromPolygons(new ArrayList()).historySync(this).historySync(csg); } + if(defaultOptType==OptType.Manifold3d) { + new RuntimeException("Manifold3d not implemented here").printStackTrace(); + } + Node a; try { a = new Node(this.clone().getPolygons(), this.getPolygons().get(0).getPlane()); From 640269757baeeb2b648e8f69755bea2de82b9132 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 16 Mar 2026 12:11:41 -0400 Subject: [PATCH 19/21] formatting --- src/main/java/eu/mihosoft/vrl/v3d/CSG.java | 83 +++++++++---------- .../vrl/v3d/ext/imagej/STLLoader.java | 2 +- .../vrl/v3d/ext/quickhull3d/HullUtil.java | 2 +- .../eu/mihosoft/vrl/v3d/Manifold3d_test.java | 4 - 4 files changed, 43 insertions(+), 48 deletions(-) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java index aa72cdf0..15a2b54d 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java @@ -42,7 +42,6 @@ import eu.mihosoft.vrl.v3d.parametrics.Parameter; import java.io.File; -import java.io.IOException; import java.io.Serializable; import java.lang.reflect.Field; import java.time.Duration; @@ -195,7 +194,7 @@ public void progressUpdate(int currentIndex, int finalIndex, String type, CSG in private int pointsAdded; private String uniqueId = UUID.randomUUID().toString(); - private static ManifoldBindings manifold=null; + private static ManifoldBindings manifold = null; /** * Instantiates a new csg. @@ -890,15 +889,15 @@ public CSG union(CSG csg) { // triangulate(); // csg.triangulate(); switch (getOptType()) { - case CSG_BOUND: - return _unionCSGBoundsOpt(csg).historySync(this).historySync(csg); - case POLYGON_BOUND: - return _unionPolygonBoundsOpt(csg).historySync(this).historySync(csg); - case Manifold3d: - new RuntimeException("Not implemented yet").printStackTrace(); - default: - // return _unionIntersectOpt(csg); - return _unionNoOpt(csg).historySync(this).historySync(csg); + case CSG_BOUND : + return _unionCSGBoundsOpt(csg).historySync(this).historySync(csg); + case POLYGON_BOUND : + return _unionPolygonBoundsOpt(csg).historySync(this).historySync(csg); + case Manifold3d : + new RuntimeException("Not implemented yet").printStackTrace(); + default : + // return _unionIntersectOpt(csg); + return _unionNoOpt(csg).historySync(this).historySync(csg); } } @@ -1416,14 +1415,14 @@ public CSG difference(CSG csg) { // polygons if (this.getPolygons().size() > 0 && csg.getPolygons().size() > 0) { switch (getOptType()) { - case CSG_BOUND: - return _differenceCSGBoundsOpt(csg).historySync(this).historySync(csg); - case POLYGON_BOUND: - return _differencePolygonBoundsOpt(csg).historySync(this).historySync(csg); - case Manifold3d: - new RuntimeException("Not implemented yet").printStackTrace(); - default: - return _differenceNoOpt(csg).historySync(this).historySync(csg); + case CSG_BOUND : + return _differenceCSGBoundsOpt(csg).historySync(this).historySync(csg); + case POLYGON_BOUND : + return _differencePolygonBoundsOpt(csg).historySync(this).historySync(csg); + case Manifold3d : + new RuntimeException("Not implemented yet").printStackTrace(); + default : + return _differenceNoOpt(csg).historySync(this).historySync(csg); } } else @@ -1438,16 +1437,16 @@ public CSG difference(CSG csg) { if (intersectingParts.getPolygons().size() > 0) { switch (getOptType()) { - case CSG_BOUND: - return _differenceCSGBoundsOpt(intersectingParts).historySync(this) - .historySync(intersectingParts); - case POLYGON_BOUND: - return _differencePolygonBoundsOpt(intersectingParts).historySync(this) - .historySync(intersectingParts); - case Manifold3d: - new RuntimeException("Not implemented yet").printStackTrace(); - default: - return _differenceNoOpt(intersectingParts).historySync(this).historySync(intersectingParts); + case CSG_BOUND : + return _differenceCSGBoundsOpt(intersectingParts).historySync(this) + .historySync(intersectingParts); + case POLYGON_BOUND : + return _differencePolygonBoundsOpt(intersectingParts).historySync(this) + .historySync(intersectingParts); + case Manifold3d : + new RuntimeException("Not implemented yet").printStackTrace(); + default : + return _differenceNoOpt(intersectingParts).historySync(this).historySync(intersectingParts); } } else return this; @@ -1594,10 +1593,10 @@ public CSG intersect(CSG csg) { ex.printStackTrace(); return CSG.fromPolygons(new ArrayList()).historySync(this).historySync(csg); } - if(defaultOptType==OptType.Manifold3d) { + if (defaultOptType == OptType.Manifold3d) { new RuntimeException("Manifold3d not implemented here").printStackTrace(); } - + Node a; try { a = new Node(this.clone().getPolygons(), this.getPolygons().get(0).getPlane()); @@ -1719,19 +1718,19 @@ public String toStlString() { toStlString(sb); return sb.toString(); } - + public CSG to3mf(File target) { - if(defaultOptType == OptType.Manifold3d) { + if (defaultOptType == OptType.Manifold3d) { new RuntimeException("Manifold3d 3mf export not implemented yet").printStackTrace(); - }else { + } else { throw new RuntimeException("Non-Manifold3d 3mf export not implemented yet"); } return this; } - public static CSG loadFrom3mf(File target) { - if(defaultOptType == OptType.Manifold3d) { + public static CSG loadFrom3mf(File target) { + if (defaultOptType == OptType.Manifold3d) { new RuntimeException("Manifold3d 3mf export not implemented yet").printStackTrace(); - }else { + } else { throw new RuntimeException("Non-Manifold3d 3mf export not implemented yet"); } return null; @@ -1745,7 +1744,7 @@ public static CSG loadFrom3mf(File target) { * @return the specified string builder */ public StringBuilder toStlString(StringBuilder sb) { - if(defaultOptType == OptType.Manifold3d) { + if (defaultOptType == OptType.Manifold3d) { new RuntimeException("Manifold3d STL export not implemented yet").printStackTrace(); } triangulate(false); @@ -2804,11 +2803,11 @@ protected OptType getOptType() { * the optType to set */ public static void setDefaultOptType(OptType optType) { - if(optType == OptType.Manifold3d) { + if (optType == OptType.Manifold3d) { try { manifold = new ManifoldBindings(); Slice.setSliceEngine(new ISlice() { - + @Override public List slice(CSG incoming, Transform slicePlane, double normalInsetDistance) throws ColinearPointsException { @@ -2819,7 +2818,7 @@ public List slice(CSG incoming, Transform slicePlane, double normalInse } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); - optType=defaultOptType; + optType = defaultOptType; } } defaultOptType = optType; @@ -2860,7 +2859,7 @@ public static enum OptType { /** The polygon bound. */ POLYGON_BOUND, - + Manifold3d, /** The none. */ diff --git a/src/main/java/eu/mihosoft/vrl/v3d/ext/imagej/STLLoader.java b/src/main/java/eu/mihosoft/vrl/v3d/ext/imagej/STLLoader.java index 02bad020..217d6cb9 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/ext/imagej/STLLoader.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/ext/imagej/STLLoader.java @@ -49,7 +49,7 @@ public STLLoader() { * Signals that an I/O exception has occurred. */ public ArrayList parse(File f) throws IOException { - if(CSG.getDefaultOptionType()==OptType.Manifold3d) { + if (CSG.getDefaultOptionType() == OptType.Manifold3d) { new RuntimeException("Manifold3d STL import not implemented yet").printStackTrace(); } ArrayList polygons = new ArrayList<>(); diff --git a/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java b/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java index d03f0b7b..364a0f49 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java @@ -72,7 +72,7 @@ public static CSG hull(List points, PropertyStorage storage) { e.printStackTrace(); } } - if(CSG.getDefaultOptionType()==OptType.Manifold3d) { + if (CSG.getDefaultOptionType() == OptType.Manifold3d) { new RuntimeException("Not implemented yet").printStackTrace(); } Point3d[] hullPoints = points.stream().map((vec) -> new Point3d(vec.x, vec.y, vec.z)).toArray(Point3d[]::new); diff --git a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java index 96127e21..6f1f4d09 100644 --- a/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java +++ b/src/test/java/eu/mihosoft/vrl/v3d/Manifold3d_test.java @@ -1,11 +1,7 @@ package eu.mihosoft.vrl.v3d; -import java.lang.foreign.MemorySegment; - import org.junit.Test; -import com.cadoodlecad.manifold.ManifoldBindings; - import eu.mihosoft.vrl.v3d.CSG.OptType; public class Manifold3d_test { From a5d08b85f091ff0ec11f46d9eed306d05add434f Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 16 Mar 2026 12:14:33 -0400 Subject: [PATCH 20/21] adding the spotless flags --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 473eeed0..945eb6b7 100644 --- a/build.gradle +++ b/build.gradle @@ -8,8 +8,9 @@ plugins { } spotless { java { + lineEndings = com.diffplug.spotless.LineEnding.UNIX // Eclipse formatter with your config file - eclipse() // Uses Eclipse's built-in default profile — no XML needed! + eclipse('4.26') // Uses Eclipse's built-in default profile — no XML needed! // Optional but recommended additions: removeUnusedImports() trimTrailingWhitespace() From bc439873459bc573af26c25b01e6d3b46a8b499a Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 16 Mar 2026 12:22:50 -0400 Subject: [PATCH 21/21] enforce the file line endings --- .gitattributes | 2 + box.svg | 168 +++++++++++++++++++++---------------------- gradlew.bat | 188 ++++++++++++++++++++++++------------------------- 3 files changed, 180 insertions(+), 178 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..1489a259 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto eol=lf +*.java eol=lf \ No newline at end of file diff --git a/box.svg b/box.svg index cbd7f4bd..58c19fa8 100644 --- a/box.svg +++ b/box.svg @@ -1,85 +1,85 @@ - - - -ABox - - -Box - ABox -2024-10-27 21:50:41 -https://boxes.hackerspace-bamberg.de/ABox?FingerJoint_style=rectangular&FingerJoint_surroundingspaces=2.0&FingerJoint_bottom_lip=0.0&FingerJoint_edge_width=1.0&FingerJoint_extra_length=0.0&FingerJoint_finger=2.0&FingerJoint_play=0.0&FingerJoint_space=2.0&FingerJoint_width=1.0&Lid_handle=none&Lid_style=none&Lid_handle_height=8.0&Lid_height=4.0&Lid_play=0.1&x=100.0&y=100.0&h=100.0&outside=0&outside=1&bottom_edge=h&thickness=3.0&format=svg&tabs=0.0&qr_code=0&debug=0&labels=0&labels=1&reference=100.0&inner_corners=loop&burn=0.1&language=en&render=1 -https://boxes.hackerspace-bamberg.de/ABox -A simple Box - -This box is kept simple on purpose. If you need more features have a look at the UniversalBox. - -Created with Boxes.py (https://boxes.hackerspace-bamberg.de/) -Command line: boxes ABox --FingerJoint_style=rectangular --FingerJoint_surroundingspaces=2.0 --FingerJoint_bottom_lip=0.0 --FingerJoint_edge_width=1.0 --FingerJoint_extra_length=0.0 --FingerJoint_finger=2.0 --FingerJoint_play=0.0 --FingerJoint_space=2.0 --FingerJoint_width=1.0 --Lid_handle=none --Lid_style=none --Lid_handle_height=8.0 --Lid_height=4.0 --Lid_play=0.1 --x=100.0 --y=100.0 --h=100.0 --outside=0 --outside=1 --bottom_edge=h --thickness=3.0 --format=svg --tabs=0.0 --qr_code=0 --debug=0 --labels=0 --labels=1 --reference=100.0 --inner_corners=loop --burn=0.1 -Command line short: boxes ABox -Url: https://boxes.hackerspace-bamberg.de/ABox?FingerJoint_style=rectangular&FingerJoint_surroundingspaces=2.0&FingerJoint_bottom_lip=0.0&FingerJoint_edge_width=1.0&FingerJoint_extra_length=0.0&FingerJoint_finger=2.0&FingerJoint_play=0.0&FingerJoint_space=2.0&FingerJoint_width=1.0&Lid_handle=none&Lid_style=none&Lid_handle_height=8.0&Lid_height=4.0&Lid_play=0.1&x=100.0&y=100.0&h=100.0&outside=0&outside=1&bottom_edge=h&thickness=3.0&format=svg&tabs=0.0&qr_code=0&debug=0&labels=0&labels=1&reference=100.0&inner_corners=loop&burn=0.1&language=en&render=1 -Url short: https://boxes.hackerspace-bamberg.de/ABox -SettingsUrl: https://boxes.hackerspace-bamberg.de/ABox?FingerJoint_style=rectangular&FingerJoint_surroundingspaces=2.0&FingerJoint_bottom_lip=0.0&FingerJoint_edge_width=1.0&FingerJoint_extra_length=0.0&FingerJoint_finger=2.0&FingerJoint_play=0.0&FingerJoint_space=2.0&FingerJoint_width=1.0&Lid_handle=none&Lid_style=none&Lid_handle_height=8.0&Lid_height=4.0&Lid_play=0.1&x=100.0&y=100.0&h=100.0&outside=0&outside=1&bottom_edge=h&thickness=3.0&format=svg&tabs=0.0&qr_code=0&debug=0&labels=0&labels=1&reference=100.0&inner_corners=loop&burn=0.1&language=en -SettingsUrl short: https://boxes.hackerspace-bamberg.de/ABox - - - - - 100.0mm, burn:0.10mm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +ABox + + +Box - ABox +2024-10-27 21:50:41 +https://boxes.hackerspace-bamberg.de/ABox?FingerJoint_style=rectangular&FingerJoint_surroundingspaces=2.0&FingerJoint_bottom_lip=0.0&FingerJoint_edge_width=1.0&FingerJoint_extra_length=0.0&FingerJoint_finger=2.0&FingerJoint_play=0.0&FingerJoint_space=2.0&FingerJoint_width=1.0&Lid_handle=none&Lid_style=none&Lid_handle_height=8.0&Lid_height=4.0&Lid_play=0.1&x=100.0&y=100.0&h=100.0&outside=0&outside=1&bottom_edge=h&thickness=3.0&format=svg&tabs=0.0&qr_code=0&debug=0&labels=0&labels=1&reference=100.0&inner_corners=loop&burn=0.1&language=en&render=1 +https://boxes.hackerspace-bamberg.de/ABox +A simple Box + +This box is kept simple on purpose. If you need more features have a look at the UniversalBox. + +Created with Boxes.py (https://boxes.hackerspace-bamberg.de/) +Command line: boxes ABox --FingerJoint_style=rectangular --FingerJoint_surroundingspaces=2.0 --FingerJoint_bottom_lip=0.0 --FingerJoint_edge_width=1.0 --FingerJoint_extra_length=0.0 --FingerJoint_finger=2.0 --FingerJoint_play=0.0 --FingerJoint_space=2.0 --FingerJoint_width=1.0 --Lid_handle=none --Lid_style=none --Lid_handle_height=8.0 --Lid_height=4.0 --Lid_play=0.1 --x=100.0 --y=100.0 --h=100.0 --outside=0 --outside=1 --bottom_edge=h --thickness=3.0 --format=svg --tabs=0.0 --qr_code=0 --debug=0 --labels=0 --labels=1 --reference=100.0 --inner_corners=loop --burn=0.1 +Command line short: boxes ABox +Url: https://boxes.hackerspace-bamberg.de/ABox?FingerJoint_style=rectangular&FingerJoint_surroundingspaces=2.0&FingerJoint_bottom_lip=0.0&FingerJoint_edge_width=1.0&FingerJoint_extra_length=0.0&FingerJoint_finger=2.0&FingerJoint_play=0.0&FingerJoint_space=2.0&FingerJoint_width=1.0&Lid_handle=none&Lid_style=none&Lid_handle_height=8.0&Lid_height=4.0&Lid_play=0.1&x=100.0&y=100.0&h=100.0&outside=0&outside=1&bottom_edge=h&thickness=3.0&format=svg&tabs=0.0&qr_code=0&debug=0&labels=0&labels=1&reference=100.0&inner_corners=loop&burn=0.1&language=en&render=1 +Url short: https://boxes.hackerspace-bamberg.de/ABox +SettingsUrl: https://boxes.hackerspace-bamberg.de/ABox?FingerJoint_style=rectangular&FingerJoint_surroundingspaces=2.0&FingerJoint_bottom_lip=0.0&FingerJoint_edge_width=1.0&FingerJoint_extra_length=0.0&FingerJoint_finger=2.0&FingerJoint_play=0.0&FingerJoint_space=2.0&FingerJoint_width=1.0&Lid_handle=none&Lid_style=none&Lid_handle_height=8.0&Lid_height=4.0&Lid_play=0.1&x=100.0&y=100.0&h=100.0&outside=0&outside=1&bottom_edge=h&thickness=3.0&format=svg&tabs=0.0&qr_code=0&debug=0&labels=0&labels=1&reference=100.0&inner_corners=loop&burn=0.1&language=en +SettingsUrl short: https://boxes.hackerspace-bamberg.de/ABox + + + + + 100.0mm, burn:0.10mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gradlew.bat b/gradlew.bat index 9b42019c..9d21a218 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,94 +1,94 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega