Plugin Request "Find Faces by Sides"
-
Fredo Tools has a "Count Faces by Sides" plugin, but this only quantifies the number of faces of each type. Is it possible to have a plugin that finds (and selects) faces having a specified number of sides? Often when importing a SketchUp OBJ export, you get an error message "cannot import faces having more than 4 sides" A "Find Faces by Sides" plugin, used in conjunction with Fredo's "Count Faces by Sides" would assist in editing object geometry prior to export. Perhaps some kind "Ruby literate" soul could help in this regard?
Regards to all,
Willie -
One liner, copy/pasted into Ruby Console + <enter>.
Change the initialn=4
to the number of sides to highlight...n=4;m=Sketchup.active_model;s=m.selection;s.clear;m.active_entities.each{|e|s.add(e) if e.is_a?(Sketchup;;Face)&&e.outer_loop.edges.length==n};
-
Works fine!
(if all the objects have not all the same number of sides for their facetts!
Does it possible to have for example n=7 and n=9 selected on the same time?
-
Thanks TIG!
Easy when you know how, I'm going to have to learn Ruby!
Regards,
Willie
Advertisement