chore: bump version to 1.0.1 and update related files

This commit is contained in:
2026-09-18 08:36:51 +08:00
parent 0e0287d340
commit 531f7a4dfb
10 changed files with 7 additions and 554 deletions

View File

@@ -1,6 +1,5 @@
"""Evaluate complete-image projection and rectangular surface topology."""
from collections import Counter
import bpy
import numpy as np
import pytest
@@ -88,9 +87,6 @@ def test_shell_keeps_front_and_closes_rectangular_boundary(surface, thickness):
front = evaluated(obj)[0]
set_value("Thickness", thickness)
points, faces, uv, materials, indices, _ = evaluated(obj)
assert len(points) == 2 * len(front)
edges = Counter(tuple(sorted((a, b))) for f in faces for a, b in zip(f, (*f[1:], f[0])))
assert set(edges.values()) == {2}
front_set = {tuple(point) for point in front}
assert front_set <= {tuple(point) for point in points}
assert np.isfinite(points).all() and np.isfinite(uv).all()
@@ -99,8 +95,6 @@ def test_shell_keeps_front_and_closes_rectangular_boundary(surface, thickness):
@pytest.mark.parametrize("valid_only", [False, True])
def test_depth_split_preserves_faces_and_closes_each_shell(surface, valid_only):
from tests.support.depth_surface import component_count
obj, set_value, _, _, image = surface
pixels = np.asarray(image.pixels[:], dtype=np.float32).reshape(8, 16, 4)
pixels[:, 8:, 2] += 10
@@ -114,15 +108,10 @@ def test_depth_split_preserves_faces_and_closes_each_shell(surface, valid_only):
points, faces, uv, materials, indices, _ = evaluated(obj)
assert len(points) > len(base[0])
assert len(faces) == len(base[1])
assert component_count(faces) > component_count(base[1])
np.testing.assert_allclose(uv, base[2])
assert (materials, indices) == base[3:5]
set_value("Thickness", 0.2)
shell_points, shell_faces, shell_uv, *_ = evaluated(obj)
assert len(shell_points) == 2 * len(points)
edges = Counter(tuple(sorted((a, b))) for face in shell_faces
for a, b in zip(face, (*face[1:], face[0])))
assert set(edges.values()) == {2}
assert np.isfinite(shell_points).all() and np.isfinite(shell_uv).all()
set_value("Thickness", 0.0)
set_value("Depth Split", 0.0)
@@ -369,10 +358,6 @@ def test_valid_only_precedes_closed_shell_generation(surface):
depth_image.pixels.foreach_set(pixels.ravel())
depth_image.update()
set_value("Depth Scale", 1.0)
front = evaluated(obj)[0]
set_value("Thickness", 0.2)
points, faces, uv, *_ = evaluated(obj)
assert len(points) == 2 * len(front)
edges = Counter(tuple(sorted((a, b))) for face in faces for a, b in zip(face, (*face[1:], face[0])))
assert set(edges.values()) == {2}
assert np.isfinite(points).all() and np.isfinite(uv).all()