Preprocessing

Preprocessing

Topics relate to geometry, meshing, and CAD

Ansys Meshing Script generated by recording can not be used in other similar geometry models

    • Ciel_yy
      Subscriber

      I have generated a series of parameterized geometry models which only differ in one parameter(for example, the length in one of the part of the geometry model)

      My purpose is to get a python script with the recording fuction by processing the first one geometry model manually. Then use the python script to automatically mesh other similar geometry models. However, something goes wrong when I use the script to process the second geometry model.

      To figure out the reason for the question, I also get python script from the second geometry model with the same manual processing schedule. By comparing the two python script, I find the Ids of the same part of the two different geometry model has changed, which leads to the error above.

      Just as shown in the picture Below, I mesh the same part of the geometry model as well as start to record python script.  I click the Mesh button then select Method button then select the particular part of the model which is shown in violet in the picture Below . The corresponding python scripts for the the first and second geometry are show below.

    • Aniket
      Ansys Employee
      The 25 (not 23) that you see is the id of the object in the tree, whereas 68 or 69 is the reference_ID that you see in the Selection information window.
      Both things can change depending on the source of the geometry. You will need to use some other logic such as bounding box, part name, volume, number of faces etc to filter out the bodies.
      -Aniket
      How to access Ansys help links
      Guidelines for Posting on Ansys Learning Forum
    • Ciel_yy
      Subscriber
      thanks very much for your answer. I am very lucky to get the reply from you who I would like to invite to answer the question(but I am new to here, know nothing about how to invite others).
      I intened to use the part name to filter out the bodies, but nothing useful info has been found.
      I have tried a lot of script, but no one works.
      May u offer me some example using the part name to filter out the bodies.
      Thanks very much
    • sch401
      Subscriber
      Do you know how to find the reference ID?
    • Aniket
      Ansys Employee
      reference_ID can be found in selection information.
      -Aniket
      How to access Ansys help links
      Guidelines for Posting on Ansys Learning Forum

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