Hi milkywaif,
> This script is not working for me. I'm trying to select edge boundary of selected faces
> but my object does not have any naked edges.
Yeah that script was specifically designed to target naked edges only because that's what was requested, so if your object does not have naked edges in it, that's normal that particular script will not work with it.
It looks like you want to switch selection from faces to edges but not select edges that were joined between 2 selected faces.
Try this:
script: /* switch selection from selected faces to edges on those faces adjacent to unselected faces */ var gd = moi.geometryDatabase; var seledges = moi.geometryDatabase.createObjectList(); var faces = gd.getSelectedObjects().getFaces(); for ( var i = 0; i < faces.length; ++i ) { var edges = faces.item(i).getEdges(); for ( var j = 0; j < edges.length; ++j ) { var edge = edges.item(j); var allselected = true; var facesofedge = edge.getFacesOfEdge(); for ( var k = 0; k < facesofedge.length; ++k ) { if ( !facesofedge.item(k).selected ) { allselected = false; } } if ( !allselected || facesofedge.length == 1 ) { seledges.addObject( edge ); } } } gd.deselectAll(); seledges.setProperty( 'selected', true );
- Michael
|