It really helps everyone if you detail what isn’t working and what happened instead of the thing you expected to happen. Otherwise we have to guess
Looking at the code I’m guessing you are getting a NoMethodError when you call fade.followme, because you actually have an Array instead of a Sketchup::Face.
Instead of this:
face = model.selection.grep(Sketchup::Face)
You probably want:
face = model.selection.grep(Sketchup::Face).first
This is grabbing the first item in the enumerable that grep is returning.
Thank you for you advice.
I figure out what you’re trying to say
I think I need to use the same variable, and tell computer how to distinguish face and path next time.
Not sure I understood that. Here’s a complete snippet of what I mean:
model = Sketchup.active_model
edges = model.selection.grep(Sketchup::Edge)
face = model.selection.grep(Sketchup::Face)[0] # Only change, I'm picking the first face
path = edges
face.followme path
The model variable have not been defined, as well as the followme will return false, because the path including the face boundary edges too.
Please check my snippet in my earlier post above. That will work.