affaan-m/ECC · error · ValueError

mesh has invalid or empty geometry bounds

Error message

mesh has invalid or empty geometry bounds

What it means

validate_bounds in blender_prop.py verifies the imported mesh has usable geometry: the scene contains no mesh object (or its geometry bounds are empty/invalid), so no prop can be built from it.

Solutions

  1. Re-export the mesh from the 3D tool with valid geometry
  2. Open the mesh in a viewer to confirm it contains real, non-degenerate geometry
  3. Regenerate the mesh from the image-to-3d provider
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at skills/taste-application/scripts/blender_prop.py:117 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/2e07671ed8e31cd7. Report an issue: GitHub.

Appendix: source

Thrown at skills/taste-application/scripts/blender_prop.py:117

                               ("height", height, 16384), ("fps", fps, 240)):
        if (isinstance(value, bool) or not isinstance(value, (int, float))
                or not math.isfinite(value) or not 1 <= value <= limit
                or (name != "fps" and int(value) != value)):
            raise ValueError(f"{name} must be finite, positive and within {limit}")


def validate_output(path: Path) -> None:
    if any(part.is_symlink() for part in (path, *path.parents)):
        raise ValueError(f"symlink output is not allowed: {path}")
    if path.exists():
        raise ValueError(f"refusing to overwrite existing output: {path}")


def validate_bounds(lower, upper) -> None:
    dimensions = [upper[i] - lower[i] for i in range(3)]
    if (not all(math.isfinite(v) for v in (*lower, *upper))
            or any(v < 0 for v in dimensions) or not 1e-9 < max(dimensions) < 1e12):
        raise ValueError("mesh has invalid or empty geometry bounds")


def camera_distance(radius: float, width: int, height: int) -> float:
    """Fit the original bounding sphere with the original 50 mm / 36 mm camera."""
    horizontal_half = math.atan(36 / (2 * 50))
    vertical_half = math.atan(math.tan(horizontal_half) * height / width)
    return max(radius * math.hypot(3.2, 0.8),
               radius / math.sin(min(horizontal_half, vertical_half)) * 1.05)


def linearize_action(action) -> None:
    """Blender 4 legacy actions and Blender 5 slotted action channel bags."""
    if hasattr(action, "fcurves"):
        curves = action.fcurves
    else:
        curves = [curve for layer in action.layers for strip in layer.strips
                  for bag in getattr(strip, "channelbags", ()) for curve in bag.fcurves]
    for curve in curves:

View on GitHub (pinned to 8321021c54)