There are a lot of FEM Mesh programs and info gmsh - seems like one of the most basic and powerful mesh generators netgen - seems like another of the most basic and powerful mesh generators, but doesn't seem supported well, so can't just download it easily, and no longer seems to be compiled into freecad You can generate a mesh directly in python code in freecad https://www.freecadweb.org/wiki/FEM_Mesh