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

nested includes do not work #1

Closed garyhodgson closed 11 years ago

garyhodgson commented 11 years ago

File 1 = mycube.scad:

module mycube(s){
    cube([s,s,s]);
}

File 2 = mymycube.scad:

include <mycube.scad>;

module mymycube(x){
    mycube(x);
}

File in Editor:

include <mymycube.scad>;

mymycube(5);

Should display a cube Actually WARNING: Ignoring unknown module: mycube openscad-parser.js:910

function main(){
    return undefined;
}; 

Because The logic to add included files only runs at a depth of 1. Need to make it recursively process each library (this is in the newParse method)