# Copyright (c) 2026 JSOL CORPORATION # # This script is released under the MIT License. # See the full license text at: # https://www.jmag-international.com/scriptlibrary/jmag_script_library_mit/ def setupMeshPropertyToMethod3(study): """Set up the automatic mesh generation method using the automatic element size determination feature of Method 3.""" meshControl = study.GetMeshControl() meshControl.SetValue(u"MeshType", "Slide") # "MeshType":Mesh Type meshControl.SetValue(u"2dMeshingMethod", "Method3") # "2dMeshingMethod":2D meshing method meshControl.SetValue(u"AutoMeshSize", "On") # "AutoMeshSize": Automatic Mesh Size meshControl.SetValue(u"AutoAirMeshSize", "On") # "AutoAirMeshSize":automatical air region mesh size meshControl.SetValue(u"AutomaticDensityGradient", "On") # "AutomaticDensityGradient":set density gradient automatically meshControl.SetValue(u"AutoGapDivision", "On") # "AutoGapDivision":Use automatic slide radial / gap division setting meshControl.SetValue(u"AutoDivision", "On") # "AutoDivision":use automatic slide division setting app = designer.GetApplication() study = app.GetCurrentStudy() setupMeshPropertyToMethod3(study)