Skip to content

Update Center Rectangle tool to have center point, construction lines#10941

Merged
franknoirot merged 1 commit intomainfrom
franknoirot/roadmap-362/centre-rectangle-proper-now
Apr 10, 2026
Merged

Update Center Rectangle tool to have center point, construction lines#10941
franknoirot merged 1 commit intomainfrom
franknoirot/roadmap-362/centre-rectangle-proper-now

Conversation

@franknoirot
Copy link
Copy Markdown
Contributor

Addresses a concern raised by @alteous and @jamwaffles regarding our Center Rectangle sketch tool, which until now has been a light wrapper around the corner rectangle tool. Now it matches other CAD tool implementations, with equal diagonal construction lines between opposing corners, and a point coincident to both lines.

This also adds proper snapping behavior to the rectangle tool family, which had been being swallowed by the tool's state machine.

Demo

Screenshare.-.2026-04-09.3_16_42.PM-compressed.mp4

Codex-assisted, sorry @jamwaffles

Initial prompt:

Our centerRectTool in sketchSolveImpl.ts uses the same underlying rectangle geometry as the cornerRectTool, but it should really also include two additional construction lines, each coincident with opposing corner points of the rectangle, an equal length constraint on those lines, and a point coincident with both lines, placed in the rectangle's center as its first point during the creation flow.

Please refactor sketchSolveImpl.ts and rectTool.ts as needed to support this alternative rectangle representation. If it's easiest to create a new centerRectTool.ts based on rectTool.ts and rename the latter to cornerRectTool.ts afterward, go for it. If it's simpler to extend rectTool to take additional config somehow, go for it.

@franknoirot franknoirot requested a review from a team as a code owner April 9, 2026 19:18
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
modeling-app Ready Ready Preview, Comment Apr 9, 2026 7:27pm

Request Review

@jamwaffles
Copy link
Copy Markdown
Contributor

@jamwaffles
Copy link
Copy Markdown
Contributor

Vercel won't connect to an engine so can't test rn. Is there a way I or someone else can give it a kick?

@jacebrowning
Copy link
Copy Markdown
Contributor

@jamwaffles I'm not sure. It's loading for me:

Screenshot 2026-04-10 at 1 10 58 PM

@franknoirot franknoirot merged commit 2c83429 into main Apr 10, 2026
58 checks passed
@franknoirot franknoirot deleted the franknoirot/roadmap-362/centre-rectangle-proper-now branch April 10, 2026 17:22
jacebrowning added a commit that referenced this pull request Apr 10, 2026
* main:
  Add ability to double-click sketch solve entities to enter sketch editing (#10960)
  Update Center Rectangle tool to have center point, construction lines (#10941)
  Update all occurences of double/missing caps in loft/sweep results (#10952)
  Update feature tree while in sketch mode (#10957)
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.

3 participants