By PyAEDT, I want to determine more than two faces using the bottom_face_y function.

Taeseok
Taeseok Member Posts: 2 **

If there are multiple faces for an object and I want to determine all the faces located at the bottom (-y) in order to set the source, how can I do that using the bottom_face_y function?

Tagged:

Answers

  • Chris Harrold
    Chris Harrold Member, Administrator, Employee Posts: 183
    5 Answers 100 Comments Photogenic Name Dropper
    admin

    @svandenb-dev - can you take a look at this one for assistance? Thanks!

  • svandenb-dev
    svandenb-dev Member, Employee Posts: 4
    First Comment Name Dropper Ansys Employee First Answer
    ✭✭✭
  • Giulia M.
    Giulia M. Member, Employee Posts: 18
    10 Comments Photogenic Name Dropper First Answer
    ✭✭✭
    edited May 28

    Hi @Taeseok,

    Thanks for your message.
    If you try to use bottom_face this will give you back only one of the faces.
    What you could do is to compare normal of the faces of your object.
    Suppose my object is a box:
    my_box = m3d.modeler["my_box"]
    you can get the faces with the same normal as:
    faces = [face for face in box.faces if face.normal == [0, 0, -1]]

    Hope this helps!
    Kind regards,

    Giulia