Mesh12#

Meshing of a part designed by cad software.

Mesh12
Mesh12
12 from EasyFEA import Display, Folder, Mesher, ElemType, PyVista, BUILDING_GALLERY
13
14 if __name__ == "__main__":
15     Display.Clear()
16
17     if BUILDING_GALLERY:
18         parts_dir = Folder.os.path.abspath("../_parts")
19     else:
20         parts_dir = Folder.Join(Folder.EASYFEA_DIR, "examples", "_parts")
21
22     stp = Folder.Join(parts_dir, "beam.stp")
23     mesh_stp = Mesher().Mesh_Import_part(stp, 3, 13 / 5, ElemType.TETRA4)
24
25     igs = Folder.Join(parts_dir, "beam.igs")
26     mesh_igs = Mesher().Mesh_Import_part(igs, 3, 13 / 5, ElemType.TETRA10)
27     # An igs file will provide a contour mesh only.
28
29     pltr1 = PyVista.Plot_Mesh(mesh_stp)
30     pltr1.add_title("beam.stp")
31     pltr1.show()
32
33     pltr2 = PyVista.Plot_Mesh(mesh_igs)
34     pltr2.add_title("beam.igs")
35     pltr2.show()

Total running time of the script: (0 minutes 1.538 seconds)

Gallery generated by Sphinx-Gallery