Select face of a circle to extrude it

Hello, help please,
I draw a rectangle, I extrude it with
the command “pushpull”, on the upper facade
I create a circle and then extrude it,
I would like to know, if someone can give me directions
how to select with Api Ruby the face of the circle, not to
blend in with the top face of the extruded rectangle…
Watching the attached video you will better understand what I mean…
Thanks for your help.
Health.

Joseph.

For this specific case

Sketchup.active_model.active_entities.grep(Sketchup::Face).last.pushpull 12

or

Sketchup.active_model.entities.grep(Sketchup::Face).select{|f|f.loops[0].edges[0].curve}.each{|f|f.pushpull 12}

1 Like

Hi, I don’t understand much…please
some more information…thank you very much…

These are two examples of Ruby code to find and pushpull the circular face.

You can test them by copying and pasting them into the Ruby Console.

No spaces between Sketchup, ::, and Face

Sketchup::Face 

likewise, no space before .last

:stuck_out_tongue_winking_eye::stuck_out_tongue_winking_eye::stuck_out_tongue_winking_eye::stuck_out_tongue_winking_eye:
:+1::+1::+1::+1::+1::+1::+1::+1::+1: