nodes: improve block mesh editing UX - #691
Open
sudhir9297 wants to merge 49 commits into
Open
Conversation
Items (e.g. solar panels) can now be placed on sloped roof surfaces. The placement system computes euler rotation from the roof surface normal so items sit flush on the slope instead of going inside. - Add roofStrategy to placement-strategies with enter/move/click/leave - Wire roof:enter/move/click/leave events in the placement coordinator - Add calculateRoofRotation in placement-math using surface normals - Support full 3D cursor rotation for sloped surfaces - Items on roofs are parented to the level with world-space rotation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… github.com:pascalorg/editor
…k-node-ux # Conflicts: # packages/editor/src/hooks/use-keyboard.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 126835b. Configure here.
| return !best || score < best.score ? { edge, score } : best | ||
| }, null)?.edge | ||
| if (!remappedEdge) return { ok: false, error: `Could not remap bevel edge: ${edgeId}` } | ||
| const result = bevelOneEdge(current, remappedEdge.id, command) |
There was a problem hiding this comment.
Bevel remap lacks distance limit
Medium Severity
When beveling multiple edges, if an edge id is gone after an earlier bevel, remapping picks the globally closest remaining edge by endpoint distance with no maximum score. A poor match can bevel an unrelated edge and still produce a topology that passes validation.
Reviewed by Cursor Bugbot for commit 126835b. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What does this PR do?
How to test
bun dev, add and select a Block, then press Tab to enter mesh edit mode.G,R, andS; constrain with X/Y/Z or Shift+axis, enter numeric values, hold Shift for precision, and confirm/cancel with click, Enter, Escape, or right-click.bun run check,bun run lint,bun run check-types, andbun run build; all should pass.Screenshots / screen recording
Recording to be added — this PR changes visual and interactive block-editing behavior.
Checklist
bun devbun checkto verify)mainbranchNote
High Risk
Rewrites core block topology commands, undo/history replacement, and mesh-edit keyboard ownership. Bugs here can corrupt meshes or scene history.
Overview
Adds Blender-style block mesh editing: modal move/rotate/scale with axis and plane locks, typed values, geometry snap, and live status. Topology commands now operate on multi-component selections (
extrude-faces,inset-faces,bevel-edges,dissolve-edges/dissolve-faces), including connected-region extrude and optional global extrude axes.Last operations can be adjusted in place (one undo step) or repeated on the current selection via injected scene/history services on selection affordances. Material slots no longer use a reusable-material picker; adding a slot assigns selected faces immediately with an accent material, and clicking a slot reassigns the selection.
Also detaches wall/ceiling items when they leave a block face, reserves R/T for the mesh editor, and cycles snapping on a clean Shift tap so Shift can still mean precision during modal ops.
Reviewed by Cursor Bugbot for commit 126835b. Bugbot is set up for automated code reviews on this repo. Configure here.