Skip to content

Add cube/box dimension parsing to agent planner#19

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-cad-model-build-issue
Draft

Add cube/box dimension parsing to agent planner#19
Copilot wants to merge 3 commits intomainfrom
copilot/fix-cad-model-build-issue

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

Requesting a cube (e.g., "build a cube of 30x30x30 mm") fell through to the default template, producing a 30x20x8 rectangular block with a cutout instead of the requested geometry.

Changes

  • Dimension parsing — Added _parse_cube_dimensions() to extract dimensions from natural language formats: 30x30x30 mm, 30mm cube, cube of 25
  • Box builder — Added _build_box() method to generate sketch + extrude operations with correct dimensions
  • Planner routing — Updated execute() and generate_code() to detect cube/box keywords and route appropriately

Example

Before:

# User: "build a cube of 30x30x30 mm"
# Output: .rect(30, 20) with depth=8 and a circular cutout

After:

# User: "build a cube of 30x30x30 mm"  
# Output:
Part(name="Generated Cube").box(30.0, 30.0, 30.0, name="Cube")
Original prompt

This section details on the original issue you should resolve

<issue_title>cad model fails to build</issue_title>
<issue_description>Image</issue_description>

<agent_instructions>can you explain the issue and ways to improve</agent_instructions>

Comments on the Issue (you are @copilot in this section)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI and others added 2 commits March 12, 2026 17:34
Co-authored-by: deanhu0822 <86739329+deanhu0822@users.noreply.github.com>
Co-authored-by: deanhu0822 <86739329+deanhu0822@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix cad model fails to build Add cube/box dimension parsing to agent planner Mar 12, 2026
Copilot AI requested a review from deanhu0822 March 12, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cad model fails to build

2 participants