# A stack of polyhedrons - getting 2D shapes instead of 3D

3 messages
Open this post in threaded view
|

## A stack of polyhedrons - getting 2D shapes instead of 3D

 Hello, I am trying to build a stack of polyhedra with each polyhedron build between two semi-random 4-edges polygons. Also, the ceiling of a polyhedron is the floor of the next one. However I get weird results, and after rendering I get 2D shapes only. What's wrong? l_4 = [rands(-1,0,1)[0], rands(-1,0,1)[0], 0]; l_3 = [rands(-1,0,1)[0], rands(1,0,1)[0], 0]; l_2 = [rands(1,0,1)[0], rands(1,0,1)[0], 0]; l_1 = [rands(1,0,1)[0], rands(-1,0,1)[0], 0]; union() {         for(i=[1:10]) {                 u_1 = [rands(-1,0,1)[0], rands(-1,0,1)[0],i];                 u_2 = [rands(-1,0,1)[0], rands(1,0,1)[0], i];                 u_3 = [rands(1,0,1)[0], rands(1,0,1)[0], i];                 u_4 = [rands(1,0,1)[0], rands(-1,0,1)[0], i];                 my_points = [l_1, l_2, l_3, l_4, u_1, u_2, u_3, u_4];                 my_faces = [[0,1,2,3], [0,1,5,4], [1,2,6,5], [2,3,7,6], [3,0,4,7], [4,5,6,7]];                 polyhedron(points = my_points, faces = my_faces, convexity = 10);                 l_1 = [rands(-1,0,1)[0], rands(-1,0,1)[0], i-1];                 l_2 = [rands(-1,0,1)[0], rands(1,0,1)[0], i-1];                 l_3 = [rands(1,0,1)[0], rands(1,0,1)[0], i-1];                 l_4 = [rands(1,0,1)[0], rands(-1,0,1)[0], i-1];         } } -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org