Refactor depth-related tests and improve parameter handling in image cutout symmetry
This commit is contained in:
@@ -16,7 +16,6 @@ def pinned_group(
|
||||
iterations=1,
|
||||
region=1.0,
|
||||
weight=1.0,
|
||||
movement=None,
|
||||
pin_boundary=True,
|
||||
pin_sharp=True,
|
||||
):
|
||||
@@ -39,7 +38,6 @@ def pinned_group(
|
||||
control.outputs["Smooth"],
|
||||
region_value.outputs[0],
|
||||
weight=weight,
|
||||
movement=movement,
|
||||
pin_boundary=pin_boundary,
|
||||
pin_sharp=pin_sharp,
|
||||
)
|
||||
@@ -396,16 +394,3 @@ def test_junction_band_keeps_the_sharpness_weight():
|
||||
assert flat_step > 1e-3
|
||||
assert creased_step < flat_step * 0.99
|
||||
|
||||
|
||||
def test_movement_mask_keeps_the_symmetry_plane():
|
||||
"""Restricting the movement leaves the masked axis untouched."""
|
||||
points, faces = grid(4)
|
||||
# 网格落在 XZ 对称平面上,Y 是只允许被松开的对称轴。
|
||||
points = [(x, z, y) for x, y, z in points]
|
||||
points[5] = (2.0, 0.5, 1.0)
|
||||
original = np.array(points)
|
||||
masked = pinned_result(points, faces, movement=(1, 0, 1))
|
||||
np.testing.assert_array_equal(masked[:, 1], original[:, 1])
|
||||
assert np.max(np.abs(masked[:, 0] - original[:, 0])) > 1e-4
|
||||
full = pinned_result(points, faces)
|
||||
assert np.max(np.abs(full[:, 1] - original[:, 1])) > 1e-4
|
||||
|
||||
Reference in New Issue
Block a user