Updates to the MoI API of David C Morrill

 From:  bemfarmer
10857.2 
The rebuildcurve factory has 3 modes, so it may be more understandable to have 3 documentation sections.

For use as a function to refit a curve in a script: (To Be Tested)

code:
function Rebuild( obj, tol, deleteTF )
{
	var factory = moi.command.createFactory( 'rebuildcurve' );	
	factory.setInput( 0, obj ); // object(s)
//	factory.setInput( 0, WrapWithObjectList(obj) );  // Might be needed?
	factory.setInput( 1, 'refit' ); // 'mode'
	factory.setInput( 2, tol );  // default tol = 0.01
	factory.setInput( 4, deleteTF ); // 'Delete input object(s), TrueFalse'
	var rebuilt_obj = curvefactory.calculate().item(0);	
	return rebuilt_obj;	
}	

//  Code not needed for refit_only Rebuild:
//	factory.disableUpdate( true );
//	ui.bindUIToInput( 'mode', 'value', factory.getInput(1) );
//	factory.setInput( 3, 'numpoints' );
//	factory.setInput( 5, 'keepcorners' );
//	factory.setInput( 6, 'breakangle' );
//	factory.disableUpdate( false );





The above code is NOT the API documentation.

The ui.bindUIToInput comes from the rebuildcurve command.

- Brian

EDITED: 19 Sep 2022 by BEMFARMER