Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[TEST] Adding asserts to marching cubes test
  • Loading branch information
Leguark committed May 2, 2025
commit 94257e4a5e3aacbb8eb9e3ea3c78534c1eaf7abc
10 changes: 9 additions & 1 deletion test/test_modules/test_marching_cubes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,20 @@ def test_marching_cubes_implementation():
# assert arrays.scalar_field_matrix.shape == (3, 8_000) # * 3 surfaces, 8000 points

marching_cubes.set_meshes_with_marching_cubes(model)

# Assert
assert model.solutions.block_solution_type == RawArraysSolution.BlockSolutionType.DENSE_GRID
assert model.solutions.dc_meshes is None
assert model.structural_frame.structural_groups[0].elements[0].vertices.shape == (600, 3)
assert model.structural_frame.structural_groups[1].elements[0].vertices.shape == (860, 3)
assert model.structural_frame.structural_groups[2].elements[0].vertices.shape == (1_256, 3)
assert model.structural_frame.structural_groups[2].elements[1].vertices.shape == (1_680, 3)

if PLOT:
gpv = require_gempy_viewer()
gtv: gpv.GemPyToVista = gpv.plot_3d(
model=model,
show_data=True,
image=False,
image=True,
show=True
)