I am trying to load a stl file into shape js. I found Grid load in the documentation but i cannot get it to work.
Underneath is one of the things i tried. I used a file input box with it. What do i do wrong?
function main(args)
{
//user defined parameters
var stl = args[0];
//Shapejs required parameters
var modelsize = 0.1; // total size of the model
var voxelSize = 0.1*MM; // size of grid voxel
var a = modelsize*1.1; // make the grid size a little larger to have some clearance
//modules
var plate = Grid load(stl);
// Shapejs required: render the endresult
var endresult = plate;// choose the thing to be renndered
var grid = createGrid(-a,a,-a,a,-a,a,voxelSize); // create the grid
var maker = new GridMaker(); // create instance of grid maker
maker.setSource(endresult); // gives GridMaker object to work on
maker.makeGrid(grid); // GridMaker fills the grid with data
return grid; // return the grid for final processing
}