December 8, 2022 at 11:03 pmJason NewtonSubscriber
I'd like to learn how to access the mesh metrics value arrays in python , also getting topology arrays such as vertex values and/or indices. There seems to be a lot of capability of interacting with the mesher's entities but I wasn't able to figure out where the data I would like to inspect lived.
When using the macro recorder I did notice with making selections that face IDs or edge IDs would be populated to supply to the selection APIs but I couldn't figure out any way to inspect the faces in other ways, say by visiting topology related arrays.
December 9, 2022 at 8:30 amErik KostsonAnsys Employee
One can get and set the meshmetric (mesh) in the Mechanical UI.
To set the aspectratio:
To get the maximum aspect ratio given in the mesh metric details in the UI:
Hope this is of help
December 12, 2022 at 12:29 pmErik KostsonAnsys Employee
Actually a faster way is to get these direct in the geometry tree:
geometry = ExtAPI.DataModel.Project.Model.Geometry
bodies = geometry.GetChildren(DataModelObjectCategory.Body, True)
for body in bodies:
name = body.Name
December 13, 2022 at 12:46 amJason NewtonSubscriber
Is there any way to make a selection of meshed faces that have scores <= some threshold? I can see from the histogram panel for mesh metrics that if I click on it I get neighborhoods of the geometry where meshing did poorly and needs investigation. I'm opened to non python routes for that. Most typically it seems applying some sizing controls to these selected neighborhoods works pretty well and is part of my immediate goals to more or less capture that process in a script.
Baking up a step - is there any way to get the list of vertices, edges, and faces in python?
- You must be logged in to reply to this topic.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Saving & sharing of Working project files in .wbpz format
- An Unknown error occurred during solution. Check the Solver Output…..
- Understanding Force Convergence Solution Output
- Solver Pivot Warning in Beam Element Model
- Colors and Mesh Display
- How to calculate the residual stress on a coating by Vickers indentation?
- whether have the difference between using contact and target bodies
- What is the difference between bonded contact region and fixed joint
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- User manual
© 2023 Copyright ANSYS, Inc. All rights reserved.