Skip to content
Back to skills

Mesh Quality Checks

ASecurity

Sub-skill of blender-interface: Mesh Quality Checks (+2).

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
designpythongo

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill mesh-quality-checks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mesh Quality Checks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mesh Quality Checks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-mesh-quality-checks/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-mesh-quality-checks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: blender-interface-mesh-quality-checks
description: 'Sub-skill of blender-interface: Mesh Quality Checks (+2).'
version: 1.1.0
category: engineering
type: reference
scripts_exempt: true
---

# Mesh Quality Checks (+2)

## Mesh Quality Checks


```python
def validate_imported_mesh(obj):
    """Validate mesh quality after import."""
    import bmesh
    checks = {"passed": True, "issues": []}

    mesh = obj.data
    bm = bmesh.new()
    bm.from_mesh(mesh)

    # Check for non-manifold edges
    non_manifold = [e for e in bm.edges if not e.is_manifold]
    if non_manifold:
        checks["issues"].append(f"{len(non_manifold)} non-manifold edges")

    # Check for loose vertices
    loose = [v for v in bm.verts if not v.link_edges]
    if loose:
        checks["issues"].append(f"{len(loose)} loose vertices")

    # Check for degenerate faces (zero area)
    degen = [f for f in bm.faces if f.calc_area() < 1e-8]
    if degen:
        checks["issues"].append(f"{len(degen)} degenerate faces")

    # Check normals consistency
    bm.normal_update()

    bm.free()

    checks["vertex_count"] = len(mesh.vertices)
    checks["face_count"] = len(mesh.polygons)
    checks["passed"] = len(checks["issues"]) == 0
    return checks
```


## Render Validation


```python
import os

def validate_render_output(output_path, expected_frames=1):
    """Validate render output exists and is reasonable."""
    checks = {"passed": True, "issues": []}

    if not os.path.exists(output_path):
        checks["issues"].append(f"Output not found: {output_path}")
        checks["passed"] = False
        return checks

    size_bytes = os.path.getsize(output_path)
    if size_bytes < 1000:
        checks["issues"].append(f"Output suspiciously small: {size_bytes} bytes (likely blank)")
        checks["passed"] = False

    # Check image dimensions (requires PIL)
    try:
        from PIL import Image
        img = Image.open(output_path)
        checks["resolution"] = img.size
        checks["mode"] = img.mode

        # Check if image is all-black (failed render)
        extrema = img.convert("L").getextrema()
        if extrema == (0, 0):
            checks["issues"].append("Render is all-black — check lighting and materials")
            checks["passed"] = False
    except ImportError:
        checks["issues"].append("PIL not available — skipping image content check")

    return checks
```


## Scale and Units Check


```python
def validate_engineering_scale(obj, expected_max_dim_m=500):
    """Check that imported geometry is at engineering scale (meters)."""
    dims = obj.dimensions
    max_dim = max(dims)

    if max_dim < 0.001:
        return {"issue": f"Max dimension {max_dim:.6f}m — likely in mm, scale by 1000"}
    if max_dim > expected_max_dim_m * 10:
        return {"issue": f"Max dimension {max_dim:.1f}m — likely wrong units"}
    return {"ok": True, "dimensions_m": tuple(dims)}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.