Hello Michael,
I try to name naked Edges of a sweep - also the sweep itself. It seems that it is working - a cloned object that is added to the DB has the right name. If I apply the sweep-surface to the DB (apply button) it is named, but the naked edges are still unnamed.
Here is the code-fragment. I have marked the relevant lines with "///////////////////////////////////////////"
var factory = moi.command.createFactory('sweep');
factory.setInput(0, inProfiles);
factory.setInput(1, Rails);
factory.setInput(4, this.properties.pointy_ends); //Pointy ends
factory.setInput(5, this.properties.Twist); //Twist
factory.setInput(7, cap_ends); //Twist
var output = factory.calculate();
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
output.item(0).name=this.properties.edgeName;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
for (var i = 0; i < output.item(0).getNakedEdges().length; i++)
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
output.item(0).getNakedEdges().item(i).name = this.properties.edgeName + "_E" + i;
this.tempObjects.addObject(output.item(0).getNakedEdges().item(i).clone());
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
moi.geometryDatabase.addObjects(this.tempObjects); // throwing the Objects to the database, so they are selectable!!!
if (this.properties.visible == 'false')
for (var i = 0; i < this.tempObjects.length; i++)
{
this.tempObjects.item(i).hidden = true;
}
this.setOutputData(0, output);
factory.cancel();
Is it possible at all?
Have a nice day
and thanks in advance!
Karsten
|