From f5281f5b3f8ac086438f8a80ce232de263ff3cac Mon Sep 17 00:00:00 2001 From: Ruben de Bruin Date: Mon, 19 Jun 2023 16:39:21 +0200 Subject: [PATCH] documented normals in merge --- src/pymeshup/gui/main.py | 2 ++ src/pymeshup/hull.py | 2 +- src/pymeshup/volumes.py | 2 +- tests/test_skeleton.py | 25 ------------------------- 4 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/pymeshup/gui/main.py b/src/pymeshup/gui/main.py index 3d3f6a5..41cb724 100644 --- a/src/pymeshup/gui/main.py +++ b/src/pymeshup/gui/main.py @@ -55,6 +55,8 @@ - crop(xmin, xmax, ymin, ymax, zmin, zmax) - cut_at_waterline() - cut_at_xz() +- merge_close_vertices(pct) +- invert_normals() ! These modifiers return a modified copy. They do not modify the volume itself: - b.rotate(90) # does not do anything diff --git a/src/pymeshup/hull.py b/src/pymeshup/hull.py index 6da2e85..933a285 100644 --- a/src/pymeshup/hull.py +++ b/src/pymeshup/hull.py @@ -165,7 +165,7 @@ def Hull(*args): v.ms.meshing_remove_duplicate_vertices() if v.volume < 0: - v = v.invert_vertices() + v = v.invert_normals() return v diff --git a/src/pymeshup/volumes.py b/src/pymeshup/volumes.py index ce0f03b..a3b95da 100644 --- a/src/pymeshup/volumes.py +++ b/src/pymeshup/volumes.py @@ -63,7 +63,7 @@ def inside_of(self, other): return v - def invert_vertices(self): + def invert_normals(self): v = Volume(self) v.ms.meshing_invert_face_orientation() return v diff --git a/tests/test_skeleton.py b/tests/test_skeleton.py index 6e453ff..e69de29 100644 --- a/tests/test_skeleton.py +++ b/tests/test_skeleton.py @@ -1,25 +0,0 @@ -import pytest - -from pymeshup.skeleton import fib, main - -__author__ = "ruben_laptop" -__copyright__ = "ruben_laptop" -__license__ = "MPL-2.0" - - -def test_fib(): - """API Tests""" - assert fib(1) == 1 - assert fib(2) == 1 - assert fib(7) == 13 - with pytest.raises(AssertionError): - fib(-10) - - -def test_main(capsys): - """CLI Tests""" - # capsys is a pytest fixture that allows asserts agains stdout/stderr - # https://docs.pytest.org/en/stable/capture.html - main(["7"]) - captured = capsys.readouterr() - assert "The 7-th Fibonacci number is 13" in captured.out