fusion-energy / cad_to_h5m

Converts CAD file(s) such as STP and SAT to a h5m file compatible with DAGMC based simulations using the Cubit Python API
MIT License
12 stars 6 forks source link

Adding tet mesh option #14

Closed shimwell closed 3 years ago

shimwell commented 3 years ago

This PR adds the ability to generate tet meshes for the geometry

This is the first pass so it will need a bit more testing (I think the commands might have changed slightly) and I notice that the mesh sometimes makes a hex mesh instead of a tet mesh.

What do you think @AnderGray

codecov[bot] commented 3 years ago

Codecov Report

Merging #14 (e413045) into develop (0aed7d0) will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           develop     #14   +/-   ##
=======================================
  Coverage     0.00%   0.00%           
=======================================
  Files            2       2           
  Lines          117     131   +14     
=======================================
- Misses         117     131   +14     
Impacted Files Coverage Δ
cad_to_h5m/core.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0aed7d0...e413045. Read the comment docs.

shimwell commented 3 years ago

Looks like this is passing the tests so it is probably good enough to merge. Do let me know if anyone experiences any issues with this feature

AnderGray commented 3 years ago

All looks good and working on my side

AnderGray commented 3 years ago

I get the following error, but continues running :

[2021-08-24 10:45:20.953] [error] Unrecognized Identifier: 'geometric'

ERROR: <stdin>, line 21. Unrecognized Identifier: 'geometric'
[2021-08-24 10:45:20.954] [error] syntax error (<stdin>, line 22)

ERROR: <stdin>, line 21. syntax error (<stdin>, line 22)
Journaled Command: volume 3 size 0.5
shimwell commented 3 years ago

I guess the python API has changed a bit, we could make a mesh manually and record the cubit commands to see how it works

AnderGray commented 3 years ago

I had the same error when running with journal/ gui. Could it be he syntax has changed with the cubit version?

AnderGray commented 3 years ago

It made it to the mesh export however

shimwell commented 3 years ago

I think Cubit skips commands when they are incorrect. Which can give you the impression everything ran just fine.