Mesh12#

Meshing of a part designed by cad software.

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

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

Gallery generated by Sphinx-Gallery