refactor: Update cutout and depth handling by removing unused functions and adjusting parameters

This commit is contained in:
2026-09-13 22:08:32 +08:00
parent a0dd6e4a88
commit 1bf858b17e
13 changed files with 88 additions and 326 deletions

View File

@@ -20,8 +20,8 @@ def remove_boundary_triangles(group, geometry):
return delete.outputs["Geometry"]
def taper_split_profile(group, original, geometry):
"""Taper balloon thickness through the shared two-ring influence builder."""
def original_boundary_field(group, original):
"""Sample the unsplit outline in UV space after projection and separation."""
nodes, links = group.nodes, group.links
uv = nodes.new("GeometryNodeInputNamedAttribute")
uv.data_type = "FLOAT_VECTOR"
@@ -34,8 +34,13 @@ def taper_split_profile(group, original, geometry):
links.new(original_uv.outputs["Geometry"], nearest.inputs["Geometry"])
links.new(uv.outputs["Attribute"], nearest.inputs["Sample Position"])
rim = evaluate_field(group, edge_boundary_field(nodes, links), "FLOAT", "POINT")
protected = sample_field(group, original, rim, "FLOAT", index=nearest.outputs["Index"])
influence = boundary_influence(group, protected)
return sample_field(group, original, rim, "FLOAT", index=nearest.outputs["Index"])
def taper_split_profile(group, geometry, original_boundary):
"""Taper balloon thickness through the shared two-ring influence builder."""
nodes = group.nodes
influence = boundary_influence(group, original_boundary)
controls = group_input(nodes, {"Depth Split"})
band = _math(group, "MULTIPLY", influence, _math(group, "GREATER_THAN", controls.outputs["Depth Split"], 0))
retained = _math(group, "SQRT", _math(group, "MAXIMUM", _math(group, "SUBTRACT", 1, band), 0))