Discovery Import

Discovery Import

body at the root or in a component

    • Guillaume ANFOSSI
      Subscriber

      Hello,

      Do you know how to identify by script if a selected body is at the root or if the body belongs to a component ?

      Thanks,

    • Subashni Ravichandran
      Ansys Employee

      Hello GUICAD

      Let me check with my team on this and get back to you.

    • Subashni Ravichandran
      Ansys Employee

      Hello GUICAD

      Have you tried recording the script to find out?

    • Guillaume ANFOSSI
      Subscriber

      Hello Subashni,

      Here is what I would like to do:


      -the user makes a selection of a face. (ok)
      -if the body to which the face belongs is at the root then do "operation 1"
      -if the body to which the face belongs is in a component then do "operation 2"

      So the goal is according to the selection made by the user, to know if the body is at the root or placed in a component.

      Thanks

    • Subashni Ravichandran
      Ansys Employee

      Hello GUICAD

      As I'm not an expert with scripting, I checked with my Team on this and here is a sample script that identifies bodies based on location either root or components and then moves them to root and reorganize with the volume of the body. (check image)

      You may take ideas from this and maybe develop a script to identify the body based on face selection.

      Please let me know if you need further guidance on this?

       

Viewing 4 reply threads
  • You must be logged in to reply to this topic.