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=4to 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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement