Feature: Viewport Controls
As a retopology artist
I want to control viewport projection and view alignment
So that I can inspect meshes from different angles and perspectives
Background:
Given the MCP server is running
And the Blender addon is connected
And a 3D viewport is visible
Scenario: Toggle viewport to orthographic
Given the viewport is in perspective mode
When I call set_view_projection with projection="ORTHO"
Then the viewport uses orthographic projection
And there is no perspective foreshortening
And parallel lines remain parallel
Scenario: Toggle viewport back to perspective
Given the viewport is in orthographic mode
When I call set_view_projection with projection="PERSP"
Then the viewport uses perspective projection
And depth perspective is visible
Scenario Outline: Align view to global axis
Given any object is active
When I call align_view_to_axis with axis="<axis>" and side="<side>"
Then the view snaps to <expected_view> direction
And the viewport is aligned perfectly to the axis
Examples:
| axis | side | expected_view |
| Y | POS | FRONT |
| Y | NEG | BACK |
| X | POS | RIGHT |
| X | NEG | LEFT |
| Z | POS | TOP |
| Z | NEG | BOTTOM |
Scenario: Align view and switch to ortho
Given the viewport is in perspective mode
When I call align_view_to_axis with axis="Z", side="POS"
And I call set_view_projection with projection="ORTHO"
Then I have a perfect top-down orthographic view
And the view is suitable for precision modeling
Scenario: Frame selected object in view
Given an object is selected
When I call frame_selected
Then the viewport centers on the selected object
And the object fills the visible area appropriately
# ============================================================================
# focus_view_on_point - Navigate to Specific Coordinates
# ============================================================================
Scenario: Focus view on specific 3D point
Given any viewport state
When I call focus_view_on_point with x=1.0, y=2.0, z=3.0
Then the viewport centers on coordinates (1.0, 2.0, 3.0)
And the view orbits around that point
Scenario: Focus view with custom distance
When I call focus_view_on_point with x=0, y=0, z=0, distance=5.0
Then the viewport centers on origin
And the view distance is 5.0 units
And I can see the target point from appropriate distance
Scenario Outline: Focus view with axis alignment
When I call focus_view_on_point with x=0, y=0, z=0, view_axis="<axis>"
Then the viewport centers on origin
And the view aligns to <axis> direction
Examples:
| axis |
| FRONT |
| BACK |
| LEFT |
| RIGHT |
| TOP |
| BOTTOM |
Scenario: Focus view with distance and axis
When I call focus_view_on_point with x=1, y=1, z=1, distance=3.0, view_axis="FRONT"
Then the viewport centers on (1, 1, 1)
And the view distance is 3.0 units
And the view is aligned to FRONT
Scenario: Navigate to problem area from analyze_mesh_regions
Given analyze_mesh_regions returned a problem region at (2.5, -1.0, 0.8)
When I call focus_view_on_point with x=2.5, y=-1.0, z=0.8, distance=1.0
Then the viewport zooms to the problem area
And I can inspect the topology issue closely
Scenario: Navigate to pole location from get_topology_quality
Given get_topology_quality returned a pole at (0.5, 0.5, 1.2)
When I call focus_view_on_point with x=0.5, y=0.5, z=1.2, distance=0.5, view_axis="FRONT"
Then I can see the pole vertex clearly
And I can decide how to resolve the pole
Scenario: Focus maintains current distance when not specified
Given the viewport is at distance 10.0
When I call focus_view_on_point with x=0, y=0, z=0
Then the viewport centers on origin
And the view distance remains approximately 10.0
Scenario: Focus view for mesh inspection workflow
Given a mesh with topology issues
When I call analyze_mesh_regions to identify problems
And I call focus_view_on_point on each problem region
Then I can systematically inspect all problem areas
And I can fix issues one by one