[REQ] Select all connected faces with same orientation
-
Selection toys
Right Click -> Select -> Connected Coplanar Faces -
hmmm... you didn't mean for coplanar faces, did you?
-
Not coplanar. I mean connected faces that are the same, frontside or backside.
So the tool would select all connected faces that have the "same"* normal direction as the first selected face.- Same, meaning either the font or back side.
Sorry for beeing a bit vague. I hope it's a bit clearer now.
-
Can one assume that each edge only connects to max 2 faces?
-
This one liner will do it, but you might want to check that f is a face?
m=Sketchup.active_model;s=m.selection;f=s[0];a=[f];f.all_connected.each{|e|a<<e if e.class==Sketchup;;Face and e.normal==f.normal};s.clear;s.add(a) -
@unknownuser said:
Is it possible to select all connected faces with same orientation?
or not connected will be very fine

Asked for a while, but seems that is not very easy to make!
All existing plugs give partial result
-
For all faces with same normal try this (again you can add a check etc that f is a face)
m=Sketchup.active_model;s=m.selection;f=s[0];a=[f];m.active_entities.to_a.each{|e|a<<e if e.class==Sketchup;;Face and e.normal==f.normal};s.clear;s.add(a)
-
My impression was a selection tools more in the way that Orient Faces works out how faces in a surface is oriented. (Sans the actual orienting.)
-
If you want to check/match face 'orientations' rather than the faces' 'normals' there are always the methods used in my
orient_faces.rb- that mimics the built in 'orient' other faces tool for a face. The test to reverse faces uses the edge-reversed-in-face etc, that returns a certain way if the pairs of faces are oriented [in]consistently... It only works with two faces per edge as three means one is always 'wrong'...
Here is the fileorient_faces.rb -
@thomthom said:
My impression was a selection tools more in the way that Orient Faces works out how faces in a surface is oriented. (Sans the actual orienting.)
Yes that was what I was thinking also.
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