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

Options
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: 169
    First Answer First Comment First Anniversary Ansys Employee
    admin
    Options

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

  • svandenb-dev
    svandenb-dev Member, Employee Posts: 3
    First Anniversary Ansys Employee First Answer Name Dropper
    Options
  • Giulia M.
    Giulia M. Member, Employee Posts: 18
    First Comment First Anniversary Ansys Employee First Answer
    edited May 28
    Options

    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