File: test_decomposition.py

package info (click to toggle)
trimesh 4.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 33,416 kB
  • sloc: python: 35,596; makefile: 96; javascript: 85; sh: 38
file content (24 lines) | stat: -rw-r--r-- 561 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
try:
    from . import generic as g
except BaseException:
    import generic as g


class DecompositionTest(g.unittest.TestCase):
    def test_convex_decomposition(self):
        try:
            import vhacdx  # noqa
        except ImportError:
            return

        mesh = g.get_mesh("quadknot.obj")
        meshes = mesh.convex_decomposition()
        assert len(meshes) > 1
        for m in meshes:
            assert m.is_watertight
            assert m.is_convex


if __name__ == "__main__":
    g.trimesh.util.attach_to_log()
    g.unittest.main()