I’m looking to create a plugin or script where the user can create a set of multiple faces and the plugin/script will then create sets for each of the faces. Ideally, the user would name the initial set (Set-1 for example) and the plugin would then name each created set with that original name and a suffix (Set-1-1, Set-1-2, …, Set-1-n).
Sets would be created on shells and all faces will be rectangular. The sets can be defined at part or assembly level.
I have potentially thousands of sets to make. So would like to come up with something to streamline the process. However, I am not that experienced in using python.
I’ve looked in the .rpy file and it seems when you create a set of multiple faces Abaqus knows how many faces are selected, shown below. So I was wondering if you can use that? FromMask seems to be a GUI tool, which i’ve read is not very efficient. But I would be selecting the initial set in the GUI, so it seems unavoidable. Is there a way to get the faces out as a list and loop through the list creating individual sets?
p = mdb.models['Model-1'].parts['Part-1']
f = p.faces
faces = f.getSequenceFromMask(mask=('[#7f ]', ), )
p.Set(faces=faces, name='Set-1')
Currently using abq2023, so no python 3 ideally.
Any help would be greatly appreciated. Thank you.
Oliver Bracher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.