Note
Go to the end to download the full example code.
Mesh12#
Meshing of a part designed by cad software.


12 from EasyFEA import Display, Folder, Mesher, ElemType, PyVista
13
14 if __name__ == "__main__":
15 Display.Clear()
16
17 parts_dir = Folder.os.path.abspath("../_parts")
18
19 stp = Folder.Join(parts_dir, "beam.stp")
20 mesh_stp = Mesher().Mesh_Import_part(stp, 3, 13 / 5, ElemType.TETRA4)
21
22 igs = Folder.Join(parts_dir, "beam.igs")
23 mesh_igs = Mesher().Mesh_Import_part(igs, 3, 13 / 5, ElemType.TETRA10)
24 # An igs file will provide a contour mesh only.
25
26 pltr1 = PyVista.Plot_Mesh(mesh_stp)
27 pltr1.add_title("beam.stp")
28 pltr1.show()
29
30 pltr2 = PyVista.Plot_Mesh(mesh_igs)
31 pltr2.add_title("beam.igs")
32 pltr2.show()
Total running time of the script: (0 minutes 0.793 seconds)