Skip to content

Commit

Permalink
documented normals in merge
Browse files Browse the repository at this point in the history
  • Loading branch information
RubendeBruin committed Jun 19, 2023
1 parent 93d7eaa commit f5281f5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 27 deletions.
2 changes: 2 additions & 0 deletions src/pymeshup/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/pymeshup/hull.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/pymeshup/volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 0 additions & 25 deletions tests/test_skeleton.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f5281f5

Please sign in to comment.