Skip to content

Commit 5679872

Browse files
committed
adding all of the build information
1 parent 003cd40 commit 5679872

4 files changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/target/
2+
/.project
3+
/.classpath
4+
.settings
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>com.commonwealthrobotics</groupId>
4+
<artifactId>manifold3dtest</artifactId>
5+
<version>0.0.1-SNAPSHOT</version>
6+
<repositories>
7+
<repository>
8+
<id>clojars</id>
9+
<url>https://clojars.org/repo</url>
10+
</repository>
11+
</repositories>
12+
<dependencies>
13+
<dependency>
14+
<groupId>com.github.madhephaestus</groupId>
15+
<artifactId>manifold3d</artifactId>
16+
<version>3.1.1</version>
17+
</dependency>
18+
</dependencies>
19+
20+
<build>
21+
<plugins>
22+
<plugin>
23+
<groupId>org.apache.maven.plugins</groupId>
24+
<artifactId>maven-compiler-plugin</artifactId>
25+
<version>3.11.0</version>
26+
<configuration>
27+
<compilerArgs>
28+
<arg>-classpath</arg>
29+
<arg>${project.basedir}/jars/*</arg>
30+
</compilerArgs>
31+
</configuration>
32+
</plugin>
33+
</plugins>
34+
</build>
35+
36+
</project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package manifold3dtest;
2+
3+
import manifold3d.Manifold;
4+
import manifold3d.linalg.DoubleVec3;
5+
import manifold3d.manifold.MeshIO;
6+
import manifold3d.manifold.ExportOptions;
7+
8+
public class Manifold3dTestClass {
9+
public Manifold3dTestClass() {
10+
Manifold sphere = Manifold.Sphere(10.0f, 20);
11+
Manifold cube = Manifold.Cube(new DoubleVec3(15.0, 15.0, 15.0), false);
12+
Manifold cylinder = Manifold.Cylinder(3, 30.0f, 30.0f, 0, false)
13+
.translateX(20).translateY(20).translateZ(-3.0);
14+
15+
// Perform Boolean operations
16+
Manifold diff = cube.subtract(sphere);
17+
Manifold intersection = cube.intersect(sphere);
18+
Manifold union = cube.add(sphere);
19+
20+
ExportOptions opts = new ExportOptions();
21+
opts.faceted(false);
22+
23+
MeshIO.ExportMesh("CubeMinusSphere.stl", diff.getMesh(), opts);
24+
MeshIO.ExportMesh("CubeIntersectSphere.glb", intersection.getMesh(), opts);
25+
MeshIO.ExportMesh("CubeUnionSphere.obj", union.getMesh(), opts);
26+
27+
Manifold hull = cylinder.convexHull(cube.translateZ(100.0));
28+
MeshIO.ExportMesh("hull.glb", hull.getMesh(), opts);
29+
}
30+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package manifold3dtest;
2+
3+
import static org.junit.jupiter.api.Assertions.*;
4+
5+
import org.junit.jupiter.api.Test;
6+
7+
class Manifold3dTestClassTest {
8+
9+
@Test
10+
void test() {
11+
Manifold3dTestClass test = new Manifold3dTestClass();
12+
}
13+
14+
}

0 commit comments

Comments
 (0)