0

I have a large number of step files from which I want to extract the mesh information using GMSH's python API. I am following this tutorial to load and manipulate a STEP file in the official documentation page of gmsh but it makes slices before generating the mesh.

However, I just want to load a step file and generate its 3D mesh and save the mesh file to the disk without any manipulation.

How should I go about doing that?

Aman Savaria
  • 164
  • 1
  • 1
  • 11

1 Answers1

0

You can use this code.


import gmsh
gmsh.initialize()
gmsh.option.setNumber("General.Terminal", 1)
gmsh.model.add("modelo_1")

gmsh.merge("FileName.step")


gmsh.model.mesh.generate(3)

gmsh.model.geo.synchronize()
gmsh.fltk.run()
gmsh.finalize()

https://gmsh.info/doc/texinfo/gmsh.html#index-gmsh_002fmerge

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 04 '22 at 19:31