SpherePoints+ | Scripts

Thursday, 23 Oct 2014. Posted by: Smirnov

Shrink selection | Inline scripts

Thursday, 23 Oct 2014. Posted by: Smirnov
script:/* Shrink selection 1.0 */ function es(edg){ var i,f; for (i=0; i<edg.length; i++) {f=edg.item(i).getFacesOfEdge(); f.setProperty('selected',0);}} var gd = moi.geometryDatabase; gd.invertSelection(); var so = gd.getSelectedObjects(), sf=so.getFaces(), i; gd.invertSelection(); for ( i=0; i<sf.length;i++) es(sf.item(i).getEdges());

Expand selection | Inline scripts

Thursday, 23 Oct 2014. Posted by: Smirnov
script:/* Expand selection 1.0 */ function es(edg){ var i,f; for (i=0; i<edg.length; i++) {f=edg.item(i).getFacesOfEdge(); f.setProperty('selected',1);}} var so = moi.geometryDatabase.getSelectedObjects(), sf=so.getFaces(), i; for ( i=0; i<sf.length;i++) es(sf.item(i).getEdges()); es(so.getEdges());

Select edges | Inline scripts

Monday, 20 Oct 2014. Posted by: Smirnov
script: /* Select edges v1.4 */ var gd=moi.geometryDatabase, so=gd.getSelectedObjects(); function ss(o,v){o.setProperty("selected",v)} function sl(o){ for ( var i=0; i<o.length; ++i ) o.item(i).getEdges().invertProperty("selected");} gd.selectLoop(); sl(so.getFaces()); sl(so.getSolids()); sl(so.getOpenBReps()); sl(so.getSingleFaceBReps()); ss(so.getBReps(),0); ss(so.getFaces(),0);