Add comprehensive documentation for SnapForm extension
- Created development.md for development setup and licensing information. - Added features.md detailing functionalities and usage instructions for developers and users. - Introduced index.md to serve as a navigation hub for the documentation. - Developed outputs.md to explain output formats and their specifications. - Established service.md to describe the AI Service architecture and environment setup. - Created surface.md to outline the process of converting Image Empty to perspective meshes.
This commit is contained in:
@@ -333,33 +333,6 @@ class AddonTest(unittest.TestCase):
|
||||
float(np.median(edge_lengths) * np.sqrt(10.0) * 2.0),
|
||||
)
|
||||
|
||||
def test_surface_background_filter_compacts_geometry_and_attributes(self):
|
||||
vertices = np.arange(18, dtype=np.float32).reshape(6, 3)
|
||||
faces = np.asarray(((0, 1, 2), (2, 3, 4)), dtype=np.int32)
|
||||
uv = np.arange(12, dtype=np.float32).reshape(6, 2)
|
||||
attributes = {
|
||||
key: np.arange(6 if name in self.addon.image_mesh.POINT_ATTRIBUTES else 2)
|
||||
for name, (_data_type, key) in {
|
||||
**self.addon.image_mesh.POINT_ATTRIBUTES,
|
||||
**self.addon.image_mesh.FACE_ATTRIBUTES,
|
||||
}.items()
|
||||
}
|
||||
attributes["face_background"] = np.asarray((True, False))
|
||||
|
||||
result = self.addon.image_mesh.remove_surface_background(
|
||||
vertices,
|
||||
faces,
|
||||
uv,
|
||||
attributes,
|
||||
)
|
||||
|
||||
filtered_vertices, filtered_faces, filtered_uv, filtered_attributes = result
|
||||
np.testing.assert_array_equal(filtered_vertices, vertices[[2, 3, 4]])
|
||||
np.testing.assert_array_equal(filtered_faces, ((0, 1, 2),))
|
||||
np.testing.assert_array_equal(filtered_uv, uv[[2, 3, 4]])
|
||||
self.assertEqual(len(filtered_attributes["point_depth"]), 3)
|
||||
self.assertEqual(len(filtered_attributes["face_background"]), 1)
|
||||
|
||||
def test_registers_image_background_operators(self):
|
||||
self.assertIn(self.addon.RemoveImageBackground, self.addon.CLASSES)
|
||||
self.assertIn(self.addon.ApplyRemovedBackground, self.addon.CLASSES)
|
||||
@@ -706,7 +679,10 @@ class AddonTest(unittest.TestCase):
|
||||
"snapform_keep_original",
|
||||
},
|
||||
)
|
||||
self.assertEqual(operator.__annotations__["snapform_model"]["name"], "Model")
|
||||
self.assertEqual(
|
||||
operator.__annotations__["snapform_model"]["name"],
|
||||
"Depth From",
|
||||
)
|
||||
self.assertEqual(
|
||||
operator.__annotations__["snapform_unshaded"]["name"],
|
||||
"Unshaded",
|
||||
@@ -1980,7 +1956,7 @@ class AddonTest(unittest.TestCase):
|
||||
self.assertIn("DEFAULT_CLOSED", panel.bl_options)
|
||||
self.assertEqual(
|
||||
[panel.bl_label for panel in panels],
|
||||
["DA3 Output Test", "MoGe-2 API Test", "BEN2 Removal Test"],
|
||||
["DA3", "MoGe-2", "BEN2"],
|
||||
)
|
||||
|
||||
def test_service_panel_exposes_shared_service_state_and_controls(self):
|
||||
|
||||
Reference in New Issue
Block a user