Feature: Advanced Topology Analysis Tools
As a retopology artist
I want to analyze mesh topology in detail
So that I can identify and fix problem areas efficiently
Background:
Given the MCP server is running
And the Blender addon is connected
And a mesh object is active in the scene
# ============================================================================
# get_vertex_valence - Find High-Valence Vertices
# ============================================================================
Scenario: Get vertices with high valence
Given a mesh with mixed vertex valence
When I call get_vertex_valence with min_valence=5
Then I receive a list of vertex data
And each vertex includes index
And each vertex includes location coordinates (x, y, z)
And each vertex includes actual valence count
And all returned vertices have valence >= 5
Scenario: Get vertices with default valence threshold
When I call get_vertex_valence without parameters
Then the default min_valence of 5 is used
And I receive vertices that are potential problem poles
Scenario Outline: Filter vertices by valence threshold
When I call get_vertex_valence with min_valence=<threshold>
Then only vertices with valence >= <threshold> are returned
Examples:
| threshold |
| 3 |
| 4 |
| 5 |
| 6 |
Scenario: No high-valence vertices in clean mesh
Given a mesh with only valence-4 vertices (pure quad grid)
When I call get_vertex_valence with min_valence=5
Then I receive an empty list
And a message indicates the mesh has clean topology
# ============================================================================
# get_triangle_faces - Find Triangle Faces
# ============================================================================
Scenario: Get all triangle faces
Given a mesh containing triangles
When I call get_triangle_faces
Then I receive a list of triangle face data
And each face includes index
And each face includes center location (x, y, z)
And each face includes vertex indices
And the count matches the actual triangle count
Scenario: No triangles in quad-only mesh
Given a mesh with only quad faces
When I call get_triangle_faces
Then I receive an empty list
And a message indicates no triangles found
# ============================================================================
# get_ngon_faces - Find N-gon Faces
# ============================================================================
Scenario: Get all n-gon faces
Given a mesh containing n-gons (faces with 5+ vertices)
When I call get_ngon_faces
Then I receive a list of n-gon face data
And each face includes index
And each face includes center location (x, y, z)
And each face includes vertex_count
And all returned faces have vertex_count > 4
Scenario: No n-gons in clean topology mesh
Given a mesh with only quads and triangles
When I call get_ngon_faces
Then I receive an empty list
And a message indicates no n-gons found
# ============================================================================
# Error Handling
# ============================================================================
Scenario: Analyze non-mesh object
Given a curve object is active
When I call get_vertex_valence
Then I receive an error message
And the error indicates object must be a mesh
Scenario: No active object
Given no object is selected
When I call get_triangle_faces
Then I receive an error message
And the error indicates no active mesh object