Hello Al, Hello James,
please test the following code for the shell command:
code:
// Shell
function Shell()
{
this.addInput("Surfaces","objectlist");
this.addInput("Thickness","numarray");
this.addOutput("Out","objectlist");
this.properties = { mode:["Long","Long","Short"], thickness:[1], direction:["Normal","Normal","Flip","Centerline"] };
}
Shell.title = "Shell";
Shell.desc = "Shell";
Shell.prototype.onExecute = function()
{
var surfaces = this.getInputData(0, moi.geometryDatabase.createObjectList());
var data = this.processInOut(this.properties.mode[0], this.multiProcess, null, this.properties.thickness);
this.properties.thickness = data.inputs[1];
this.setOutputData(0, data.outputs[0]);
}
Shell.prototype.multiProcess = function(s, t)
{
return [factory('shell', s, t, this.properties.direction[0])];
}
LiteGraph.registerNodeType("Construct2/Shell", Shell);
@James: Please test the code first, correct the construct2.js file and post/replace it. The problem was, that you had a look in the sometimes outdated API-Documentation - it's always a good idea to look also in Michaels code under the command folder.
A nice day to all
Karsten
|