Skip to content

Snapping to 3d geometry#547

Open
NeilHarbin0 wants to merge 2 commits into
hlorus:mainfrom
NeilHarbin0:feature/snapping_to_3d
Open

Snapping to 3d geometry#547
NeilHarbin0 wants to merge 2 commits into
hlorus:mainfrom
NeilHarbin0:feature/snapping_to_3d

Conversation

@NeilHarbin0
Copy link
Copy Markdown
Contributor

All of the code in this PR was done by codex AI, and tested in Blender by me.

This feature allows you to snap sketch geometry to existing 3d geometry in the scene. It doesn't cause any constraints to be made, or link anything to make it more parametric unfortunately. It snaps to a projection of 3d geometry onto the workplane. Ideally you would be doing this in an orthographic view normal to the sketch plane, but you don't have to be. If you are not, you can still snap accurately to things that are in the same plane as the workplane, which of course covers the face you made the workplane on.

I believe this covers #12.

This implementation enables:

  • Snap to vertexes, edges, edge midpoints (when any of such snap target is enabled, and the "Snap during transforms" blender toggle is on) of visible geometry
  • Snap to any if x-ray is enabled, otherwise just front geometry
  • Circles can snap tangent to edges, or coincident with vertexes (not constrained though)
  • Works with moving points, not just drawing them
  • Applies to any drawable thing that makes a point, so lines, start of circle, arcs, points
CAD Sketcher Snapping Feature Demo

Ideally it would show the little icons you get when blender does the snapping itself, but I wasn't able to figure out how to get that without having to implement new rendering just for the plugin which would basically duplicate whatever that existing code is.

NeilHarbin0 and others added 2 commits May 3, 2026 07:22
…a blenders "Snap during transform" setting

Co-Authored-By: Codex <267193182+codex@users.noreply.github.com>
…nabled

Co-Authored-By: Codex <267193182+codex@users.noreply.github.com>
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.

1 participant