Define a sphere of influence mesh sizing through scripting
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
Answers
-
The following code can be adapted:
mesh = ExtAPI.DataModel.Project.Model.Mesh new_sizing = mesh.AddSizing() new_sizing.Location = ExtAPI.DataModel.GetObjectsByName("ns_body")[0] # scope to first object in the tree called 'ns_body' (ie, a named selection) new_sizing.Type = SizingType.SphereOfInfluence # change sizing to sphere of influence new_sizing.SphereCenter = ExtAPI.DataModel.GetObjectsByName('CS1')[0] # scope to first object in the tree called 'CS1' (ie, a CS) new_sizing.SphereRadius = Quantity('2 [mm]') new_sizing.ElementSize = Quantity('0.5 [mm]')
8