Problem with offset factory for nodeeditor

 From:  Karsten (KMRQUS)
8158.1 
Hello,
I try to create a node for the node editor with the offset factory, but I can't figure out what I should put in input 2?
The code isn't finished and should work for curves in a first step (breps later).
Could someone explain the orientation and position of the frame?
// offset
function offset()
{
this.addInput("Object", "objectlist");
this.addInput("Frame", "pointarray");
this.addInput("Distance", "numarray");
this.addOutput("Object", "objectlist");
this.properties = {mode: ["Long", "Long", "Short"], dist:[1],dir:["Normal","Normal","Flipped","Both"]};
}

offset.title = " offset";
offset.desc = " offset";

offset.prototype.onExecute = function ()
{
var data = this.processInOut(this.properties.mode[0], this.multiProcess,null, null, this.properties.dist, this.properties.dir);
this.properties.dist = data.inputs[2];

this.setOutputData(0, data.outputs[0]);

}

offset.prototype.multiProcess = function (obj, frame, dist, dir)
{

var out = [];
//sharp
out[0] = factory('offset', obj, dist, frame ,'sharp',true, null,false,false);
/* var ofFac = moi.command.createFactory('offset');
ofFac.setInput(0, obj);
ofFac.setInput(1, dist);
ofFac.setInput(2, frame);
ofFac.setInput(3, 'sharp');
ofFac.setInput(4, true);
ofFac.setInput(6, false);
ofFac.setInput(7, false);
out[0]=ofFac.calculate();
ofFac.cancel();*/

return out;
}

LiteGraph.registerNodeType("Construct2/ offset", offset);


Thanks in advance!
Karsten