garyhodgson / openscad.net

OpenSCAD.net is a partial port of OpenSCAD for the web. Powered by OpenJsCad, it uses the familiar OpenSCAD syntax to allow many OpenSCAD models to be rendered, and saved as STL, via the browser.
https://garyhodgson.github.io/openscad.net/
51 stars 8 forks source link

Polyhedron isn't rendering properly #16

Open htadashi opened 5 years ago

htadashi commented 5 years ago

Running the code below renders a cube in OpenSCAD, but OpenSCAD.net does not render the cube properly (some parts of the faces are missing). I'm using OpenSCAD.net with Google Chrome 71.0.3578.98 (64 bits).

CubePoints = [
  [  0,  0,  0 ],  //0
  [ 10,  0,  0 ],  //1
  [ 10,  7,  0 ],  //2
  [  0,  7,  0 ],  //3
  [  0,  0,  5 ],  //4
  [ 10,  0,  5 ],  //5
  [ 10,  7,  5 ],  //6
  [  0,  7,  5 ]]; //7

CubeFaces = [
  [0,1,2,3],  // bottom
  [4,5,1,0],  // front
  [7,6,5,4],  // top
  [5,6,2,1],  // right
  [6,7,3,2],  // back
  [7,4,0,3]]; // left

polyhedron( CubePoints, CubeFaces );