Problem to name subobjects in js/nodeeditor

 From:  Michael Gibson
7899.3 In reply to 7899.2 
Hi Karsten,

re:
> is it possible that clone don't copy the names of subelements?

Yeah I think that is what's happening. The way the sub-element properties work is that some attribute data needs to be prepared on the internal geometry library surfaces and edge curve objects, and then when the geometry library Brep object is duplicated it will look for those attributes and read the MoI-specific properties out from them.

This attribute preparation happens automatically for anything that goes through a geometry factory, but it's not happening if you directly call obj.clone(). I will put in a fix for that in v4 but for now instead of calling obj.clone(), try using the copy geometry factory and it should avoid that problem.

Something like:

var factory = moi.command.createFactory( 'copy' );
var origin = moi.vectorMath.createPoint(0,0,0);

factory.setInput( 0, objectlist );
factory.setInput( 1, origin ); // The "Base point" for the Transform > Copy command.
factory.setInput( 2, origin ); // The "Target point" for the Transform > Copy command.

var result_list = factory.calculate();


- Michael