Add tests and implement boundary smoothing and cutout functionality
- Introduced tests for boundary smoothing in `test_boundary_smoothing.py`, verifying that smoothing reduces stair-step artifacts while preserving boundary integrity. - Added tests for cutout boundary behavior in `test_cutout_boundary.py`, ensuring proper handling of boundary triangles and normal blending. - Created `test_temporary_attributes.py` to check the cleanup of temporary attributes across depth modifier branches, ensuring no warnings are raised. - Implemented point culling functionality in `test_validity.py`, confirming that invalid points are removed without affecting adjacent geometry. - Developed boundary smoothing logic in `boundary_smoothing.py`, allowing for depth smoothing while maintaining edge integrity. - Added cutout boundary management in `cutout_boundary.py`, including functions for removing boundary triangles and tapering thickness profiles. - Implemented validity checks in `validity.py` to ensure proper deletion of invalid vertices and associated wire edges.
This commit is contained in:
@@ -118,6 +118,21 @@ class PreferencesTest(BlenderTestCase):
|
||||
geometry = properties.geometry_model_enum_items(None, None)
|
||||
self.assertEqual(tuple(item[0] for item in geometry), expected)
|
||||
|
||||
def test_model_tiers_only_appear_in_choices(self):
|
||||
properties = self.anyimage.properties
|
||||
preferences = self.anyimage.preferences
|
||||
catalog = {model["key"]: model for model in properties.model_catalog()}
|
||||
for items in (
|
||||
properties.geometry_model_enum_items(None, None),
|
||||
preferences.BACKGROUND_MODEL_ITEMS,
|
||||
preferences.UPSCALE_MODEL_ITEMS,
|
||||
):
|
||||
for item, tier in zip(items, ("Fast", "Base", "Pro")):
|
||||
label = catalog[item[0]]["label"]
|
||||
self.assertNotIn(" | ", label)
|
||||
self.assertEqual(item[1], f"{tier} | {label}")
|
||||
self.assertEqual(properties.upscale_model_label("HAT_GAN_X4_SHARPER"), "HAT Sharper")
|
||||
|
||||
def test_model_preferences_keep_valid_choices_and_normalize_retired_keys(self):
|
||||
module = self.anyimage.preferences
|
||||
stored = self.fake_bpy.context.preferences.addons["anyimage"].preferences
|
||||
|
||||
Reference in New Issue
Block a user