fusion-energy / brep_to_h5m

Converts Brep CAD geometry files to h5m geometry files compatible with DAGMC simulations
MIT License
1 stars 2 forks source link

Adding h5m in memory method #29

Closed shimwell closed 1 year ago

shimwell commented 2 years ago

Work in progress

This should remove the need to write STL files once completed

It goes straight from the meshed Brep to h5m

useful resources https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/api/gmsh.py http://onelab.info/pipermail/gmsh/2018/012225.html https://bthierry.pages.math.cnrs.fr/tutorial/gmsh/api/detail/ https://github.com/ahojukka5/gmshparser https://github.com/dmelgarm/gmsh/blob/master/gmsh_tools.py https://gitlab.onelab.info/gmsh/gmsh/-/issues/1684

shimwell commented 2 years ago

conda build test failing as it can't find the vertices to h5m package. This is because that package only has a pypi installer currently

shimwell commented 2 years ago

Tests failing with tests/test_two_joined_cubes.brep file not found error

shimwell commented 1 year ago

currently missing the trimesh step

mesh = trimesh.load_mesh(filename)
            if mesh.is_watertight is False:
                msg = f"file {filename} is watertight"
                warnings.warn(msg)
            trimesh.repair.fix_normals(
                mesh
            )
shimwell commented 1 year ago

currently missing the trimesh step

mesh = trimesh.load_mesh(filename)
            if mesh.is_watertight is False:
                msg = f"file {filename} is watertight"
                warnings.warn(msg)
            trimesh.repair.fix_normals(
                mesh
            )

this is done in vertices to h5m package