Hi Len,
re:
> Any idea why curve is not an object?
Several reasons:
Separate factory is expecting an object list for its input, not an individual object, so you need something like this instead:
code:
function WrapWithObjectList( obj )
{
var list = moi.geometryDatabase.createObjectList();
list.addObject( obj );
return list;
}
var factory = moi.command.createFactory( 'separate' );
factory.setInput( 0, WrapWithObjectList(newcrv) );
Additionally, for this:
code:
curve = moi.geometryDatabase.getCreatedObjects;
You're missing the () at the end there so instead of calling the function getCreatedObjects you're retrieving it as a property value.
Also getCreatedObjects() isn't on geometry database, it's on the factory but also to use it you've got to call it after an .update() and before .commit().
For scripting it can be better to call
var output_list = factory.calculate();
- Michael
|