Select flat, face selection to edge
All  1-8  9-12

Previous
Next
 From:  Michael Gibson
10085.9 In reply to 10085.1 
Hi rolnxyz, here are some scripts that might help.

First one - grow face selection to one neighboring face that is coplanar with the current face selection:

script: /* Grow face selection to neighboring coplanar faces */ var faces = moi.geometryDatabase.getSelectedObjects().getFaces(); for ( var i = 0; i < faces.length; ++i ) { var f = faces.item(i); var edges = f.getEdges(); for ( var j = 0; j < edges.length; ++j ) { var e = edges.item(j); var faces2 = e.getFacesOfEdge(); for ( var k = 0; k < faces2.length; ++k ) { var f2 = faces2.item(k); if ( f2.id != f.id && f2.isPlanar && f.isPlanar && f.isOnPlane( f2.planarFrame ) ) f2.selected = true; } } }

Second one - grow face selection to all neighboring faces that are coplanar with the current face selection:

script: /* Grow face selection to multiple neighboring coplanar faces */ while ( true ) { var did_one = false; var faces = moi.geometryDatabase.getSelectedObjects().getFaces(); for ( var i = 0; i < faces.length; ++i ) { var f = faces.item(i); var edges = f.getEdges(); for ( var j = 0; j < edges.length; ++j ) { var e = edges.item(j); var faces2 = e.getFacesOfEdge(); for ( var k = 0; k < faces2.length; ++k ) { var f2 = faces2.item(k); if ( f2.id != f.id && f2.isPlanar && f.isPlanar && f.isOnPlane( f2.planarFrame ) ) if ( !f2.selected ) { f2.selected = true; did_one = true; } } } } if ( !did_one ) break; }

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  rolnxyz
10085.10 In reply to 10085.9 
That's awesome Michael, thanks for the scripts!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Chris (CHRISTOPHER021)
10085.11 In reply to 10085.9 
thx you for these !!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Frenchy Pilou (PILOU)
10085.12 
BY Max SMirnov
Increase selection

script: 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());

Decrease sélection
script: 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());
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-8  9-12