Closed The3rdIcon closed 9 years ago
Read again the OpenJSCAD documentation: put all functions calls of OpenJSCAD in a function which is called by main(), your polygon.push() is outside of main(), put it into main() or another function which is called by main() eventually. It's a design decision of the original OpenJsCad which I kept for OpenJSCAD.org. I'm aware for starters it's confusing, this is why I prominently describe it: https://github.com/Spiritdude/OpenJSCAD.org/wiki/User-Guide#anatomy-of-a-jscad-file
The example for the polygon is unclear as it isn't put into context. Below is my attempt at figuring it out but I don't understand why it. The error message I get is "Error in line 17: Uncaught ReferenceError: CSG is not defined"
If you aren't going to take the time with my code can you please at least respond with an example that works that I can copy and paste into the site so I can manipulate that and get something working. The polygons example only used the openscad method which seems more time consuming as I need to figure out how to connect the faces.