How to Copy Mesh using Ansys Scripting in Mechanical?
mesh= Model.Mesh mesh_copy = mesh.AddMeshCopy() selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) selection.Ids = source.Ids # Source Body ID mesh_copy.SourceAnchors = selection selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) selection.Ids = target.Ids # TargetBody ID mesh_copy.TargetAnchors = selection
Please note: source and target are the named selections.
source
target