List<Vector3d> listPoint = new ArrayList<Vector3d>();
listPoint.add(Vector3d.xyz(0, 10, 0));
listPoint.add(Vector3d.xyz(2, 10, 0));
listPoint.add(Vector3d.xyz(2, 5, 0));
listPoint.add(Vector3d.xyz(10, 5, 0));
listPoint.add(Vector3d.xyz(10, 0, 0));
listPoint.add(Vector3d.xyz(0, 0, 0));
listPoint.add(Vector3d.xyz(0, 10, 20));
listPoint.add(Vector3d.xyz(2, 10, 20));
listPoint.add(Vector3d.xyz(2, 5, 20));
listPoint.add(Vector3d.xyz(10, 5, 20));
listPoint.add(Vector3d.xyz(10, 0, 20));
listPoint.add(Vector3d.xyz(0, 0, 20));
listPoint.add(Vector3d.xyz(4, 5, 20));
List<List<Integer>> listFace = new ArrayList<List<Integer>>();
listFace.add(Arrays.asList(0, 1, 2, 3, 4, 5));
listFace.add(Arrays.asList(8, 7, 6, 11, 10, 9));
listFace.add(Arrays.asList(1, 0, 6, 7));
listFace.add(Arrays.asList(2, 1, 7, 8));
listFace.add(Arrays.asList(3, 2, 8, 9));
listFace.add(Arrays.asList(4, 3, 9, 10));
listFace.add(Arrays.asList(5, 4, 10, 11));
listFace.add(Arrays.asList(0, 5, 11, 6));
CSG polyhedron = new Polyhedron(listPoint, listFace).toCSG();
The red triangle should not be there. Otherwise, everything is fine.
Do I misuse the Polyhedron class, or is there an issue in its implementation ? (of course, using the
Extrude.points(...) method would be the right choice in that case, but I need to focus on Polyhedrons).
Hello,
I want to generate a simple polyhedron (L shape) with the following code:
The STL generated file for this polyhedron looks like this:
The red triangle should not be there. Otherwise, everything is fine.
Do I misuse the Polyhedron class, or is there an issue in its implementation ? (of course, using the
Extrude.points(...) method would be the right choice in that case, but I need to focus on Polyhedrons).
Regards