| 1 |
import pytest |
| 2 |
|
| 3 |
import pycolmap |
| 4 |
|
| 5 |
pytestmark = pytest.mark.skipif( |
| 6 |
not hasattr(pycolmap, "PoissonMeshingOptions"), |
| 7 |
reason="PoissonMeshingOptions not available", |
| 8 |
) |
| 9 |
|
| 10 |
|
| 11 |
def test_poisson_meshing_options_init(): |
| 12 |
options = pycolmap.PoissonMeshingOptions() |
| 13 |
assert options is not None |
| 14 |
|
| 15 |
|
| 16 |
def test_poisson_meshing_options_depth(): |
| 17 |
options = pycolmap.PoissonMeshingOptions() |
| 18 |
options.depth = 10 |
| 19 |
assert options.depth == 10 |
| 20 |
|
| 21 |
|
| 22 |
def test_poisson_meshing_options_num_threads(): |
| 23 |
options = pycolmap.PoissonMeshingOptions() |
| 24 |
options.num_threads = 4 |
| 25 |
assert options.num_threads == 4 |
| 26 |
|
| 27 |
|
| 28 |
def test_poisson_meshing_options_check(): |
| 29 |
options = pycolmap.PoissonMeshingOptions() |
| 30 |
assert options.check() |
| 31 |
|
| 32 |
|
| 33 |
def test_mesh_simplification_options_init(): |
| 34 |
options = pycolmap.MeshSimplificationOptions() |
| 35 |
assert options is not None |
| 36 |
|
| 37 |
|
| 38 |
def test_mesh_simplification_options_target_face_ratio(): |
| 39 |
options = pycolmap.MeshSimplificationOptions() |
| 40 |
options.target_face_ratio = 0.5 |
| 41 |
assert options.target_face_ratio == pytest.approx(0.5) |
| 42 |
|
| 43 |
|
| 44 |
def test_mesh_simplification_options_check(): |
| 45 |
options = pycolmap.MeshSimplificationOptions() |
| 46 |
assert options.check() |
| 47 |
|
| 48 |
|
| 49 |
@pytest.mark.skipif( |
| 50 |
not hasattr(pycolmap, "DelaunayMeshingOptions"), |
| 51 |
reason="DelaunayMeshingOptions not available", |
| 52 |
) |
| 53 |
def test_delaunay_meshing_options_init(): |
| 54 |
options = pycolmap.DelaunayMeshingOptions() |
| 55 |
assert options is not None |