Box modeling in MoI - Script request.

 From:  Michael Gibson
2088.2 In reply to 2088.1 
Hi PaQ, actually I was just going to ask you if you ran into anything
that would have helped speed up your recent session!

For the offset script - one quick note on that you don't actually
need to extract or duplicate the edge curves in order to offset
them, offset can work directly off on an edge selection. Similarly
if you have many individual curve segments touching end to end
you don't need to join them first before offset, it incorporates a
join into it automatically.

re: switch selection from faces to the edges of the face,
this should do that:

code:
script:var gd = moi.geometryDatabase; var faces = gd.getSelectedObjects().getFaces(); gd.deselectAll(); for ( var i = 0; i < faces.length; ++i ) faces.item(i).getEdges().setProperty( 'selected', true );


Please let me know if that doesn't do what you need.


Re: best way to do that, I'll take more of a look into that in a
minute, but one simple thing you might like is automatically
running offset at the end of that edge selection script above.
This should do that:

code:
script:var gd = moi.geometryDatabase; var faces = gd.getSelectedObjects().getFaces(); gd.deselectAll(); for ( var i = 0; i < faces.length; ++i ) faces.item(i).getEdges().setProperty( 'selected', true ); moi.command.execCommand( 'offset' );


- Michael