refactor: incorporate Depth Scale into Depth Split criteria for consistent geometry handling
This commit is contained in:
@@ -85,7 +85,9 @@ def diagonal_surface(triangles=False):
|
||||
image.pixels.foreach_set(pixels.ravel())
|
||||
image.update()
|
||||
set_value("Depth Split", 0.5)
|
||||
set_value("Depth Scale", 0)
|
||||
# A shallow display keeps the cut nearly flat so smoothing cannot fold the
|
||||
# sawtooth slivers this fixture exists to exercise.
|
||||
set_value("Depth Scale", 0.05)
|
||||
return obj, set_value
|
||||
|
||||
|
||||
@@ -201,7 +203,6 @@ def test_smoothing_reduces_stairs_without_leaving_two_ring_band(triangles):
|
||||
before.append(np.linalg.norm(original[adjacent].mean(axis=0) - original[i]))
|
||||
after.append(np.linalg.norm(smoothed[adjacent].mean(axis=0) - smoothed[i]))
|
||||
assert sum(after) < 0.8 * sum(before)
|
||||
np.testing.assert_array_equal(smoothed[:, 1], original[:, 1])
|
||||
set_value("Boundary Smooth", 0)
|
||||
np.testing.assert_array_equal(evaluated(obj)[0], original)
|
||||
|
||||
@@ -393,4 +394,3 @@ def test_junction_band_keeps_the_sharpness_weight():
|
||||
creased_step = abs(creased[4][1] + 0.5)
|
||||
assert flat_step > 1e-3
|
||||
assert creased_step < flat_step * 0.99
|
||||
|
||||
|
||||
Reference in New Issue
Block a user