stellarmesh / stellarmesh

Create DAGMC geometry from CAD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow stl import

shimwell opened this issue · comments

Currently brep and step files are allowable import formats.

In theroy this package could also allow stl import via moab directly.

It might be a bit different to the existing import files but might be worth considering

What's your imagined use-case for this? Would you be mixing brep models and stl models? Of course it's totally possible to import stls with gmsh or moab but would require some rethinking of how surface sense is handled.

As it stands, stls can be imported, in some capacity, like this, although correct surface sense is not guaranteed.

import gmsh
bd.Solid.make_sphere(20).faces()[0].thicken(1).export_stl("box.stl")
with mesh:
    gmsh.merge("box.stl")
    gmsh.option.set_number("Mesh.SaveAll", 1)
    gmsh.write("mesh-box.msh")
image

I would guess a user has stl geometry for the whole model, perhaps from a serpent2 simulation. I imagine a user case where they want to simulate the same serpent2 stl model in dag openmc. It looks like you can already do it, so perhaps just an example in the examples folder