Skip to content

Commit 70aced4

Browse files
committed
test the data flattening API
1 parent 5e8f1b8 commit 70aced4

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package eu.mihosoft.vrl.v3d;
2+
3+
import java.io.IOException;
4+
import java.nio.file.Paths;
5+
import java.util.ArrayList;
6+
7+
import org.junit.Test;
8+
9+
public class TestFlatData {
10+
11+
@Test
12+
public void testFlatData() throws ColinearPointsException, IOException {
13+
CSG cube = new Cube(20).toCSG();
14+
FileUtil.write(Paths.get("FlatData-cube.stl"),cube.toStlString());
15+
ArrayList<Polygon> polygons = cube.generatePolygonsFromMesh();
16+
CSG fromPoly = new CSG(polygons);
17+
FileUtil.write(Paths.get("FlatData-loaded.stl"),fromPoly.toStlString());
18+
19+
20+
}
21+
}

0 commit comments

Comments
 (0)