File: test_ngon.py

package info (click to toggle)
python-meshzoo 0.9.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 316 kB
  • sloc: python: 1,691; makefile: 8
file content (17 lines) | stat: -rw-r--r-- 353 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import numpy as np

import meshzoo

from .helpers import signed_simplex_volumes


def test_ngon():
    points, cells = meshzoo.ngon(9, 8)
    # meshzoo.save2d("9gon.svg", points, cells)
    assert len(points) == 325
    assert len(cells) == 576
    assert np.all(signed_simplex_volumes(points, cells) > 0.0)


if __name__ == "__main__":
    test_ngon()