feat: Implement depth surface strip cleanup and organize tool CLI

- Added a proposal for depth surface strip cleanup, detailing the rationale and changes to the depth plane and cutout nodes.
- Created specifications for the new cleanup requirements, including scenarios for strip removal and boundary edge detection.
- Developed tasks for implementing shared strip detection logic and integrating new interfaces for depth nodes.
- Established a new CLI structure for organizing node groups and model commands, replacing old entry points with a more intuitive command structure.
- Introduced a prototype for panorama surface generation, including requirements for distance reconstruction and geometry node surfaces.
- Added comprehensive tests for depth strip cleanup functionality, ensuring correct behavior for various mesh topologies and edge cases.
This commit is contained in:
2026-09-10 00:53:43 +08:00
parent 1622afa7a2
commit 27ca25224a
42 changed files with 1970 additions and 70 deletions

View File

@@ -5,6 +5,7 @@ import bpy
import numpy as np
import pytest
from tests.support.nodes import CUTOUT_BUILDERS
from tools.nodes.arrangement.flow import origin_socket
from anyimage.operators.cutout_tool.object import load_cutout_node_group
@@ -43,7 +44,7 @@ def test_cutout_interfaces_and_thickness_modes(source):
options = [s.name for s in inputs.values() if s.parent and s.parent.name == "Options"]
expected = ["Cleanup Threshold"]
if group == groups["DEPTH_SOLID"]:
expected += ["Split Threshold", "Reference Depth", "Edge Round", "Front Inflation", "Normal Smooth"]
expected += ["Reference Depth", "Edge Round", "Front Inflation", "Normal Smooth"]
elif group == groups["DEPTH_BALLOON"]:
expected += ["Reference Depth"]
expected += ["Smooth Weight"]
@@ -52,7 +53,10 @@ def test_cutout_interfaces_and_thickness_modes(source):
assert options == expected, (group.name, options)
assert inputs["Smooth"].socket_type == "NodeSocketInt" and inputs["Smooth"].default_value == 0
assert inputs["Smooth Weight"].default_value == 1
incoming = [link for link in group.links if link.from_node.bl_idname == "NodeGroupInput" and link.from_socket.name == "Geometry"]
incoming = [link for link in group.links
if link.to_node.bl_idname != "NodeReroute"
and origin_socket(link.from_socket).node.bl_idname == "NodeGroupInput"
and origin_socket(link.from_socket).name == "Geometry"]
assert len(incoming) == 1 and incoming[0].to_node.bl_idname == "GeometryNodeDeleteGeometry"
mesh = bpy.data.meshes.new("Profile")
mesh.from_pydata([(-1,-1,0), (1,-1,0), (1,1,0), (-1,1,0), (0,0,0)], [], [(0,1,4), (1,2,4), (2,3,4), (3,0,4)])