Page MenuHome

Transform: Snap to the intersection between the constraint and the geometry
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Aug 27 2019, 4:53 PM.
Tokens
"Like" token, awarded by hitrpr."Love" token, awarded by hadrien."Love" token, awarded by cdog."Love" token, awarded by Schiette."Love" token, awarded by Leul."Love" token, awarded by HooglyBoogly."Like" token, awarded by 1D_Inc."Love" token, awarded by Okavango."Love" token, awarded by lcs_cavalheiro."Love" token, awarded by amonpaike.

Details

Summary

ref T66422
Definition of terms used:
Constraint Plane: When the movement is constrained to a plane (Example: pressing Shift + Z while moving).
Constraint Axis: When the movement is constrained to a line (Example: pressing Z while moving).

This patch proposes to change the behavior of 4 snapping combinations:

1. While constraining to a plane, snap to an edge element:
The snap is made at the intersection between the edge direction and the constraint plane.

2. While constraining to a plane, snap to a face element:
The snap is made to the nearest point between the snap point and the line that intersects the face plane with the constraint plane.

3. While constraining to an axis, snap to an edge/line element:
The snap is made to the nearest point on the axis to the edge/line element.

4. While constraining to an axis, snap to a face element:
The snap is made at the intersection of the axis and the plane defined by the face.

To avoid unpredictable jumps outside view boundaries, an alignment check is made for each of these snapping combinations.

Scene for testing:

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 4623
Build 4623: arc lint + arc unit

Event Timeline

@Germano Cavalcante (mano-wii) do You need new icons for all those new option?

No. Those are not new snapping options.
The patch only changes current behavior of the snapping with constraint.

We are making script for 2.79 to project multiple selected edges to faces with two modes (individual directions, direction of active edge)
Also we have Corner function, that projects edges in two ways. https://youtu.be/w_zJAlN6vqc?t=264

Nice to see such development there)

  • Cleanup: Rearrange code into functions
  • Rebase and rename function
Germano Cavalcante (mano-wii) retitled this revision from Snapping and Constraints: Snapping on the intersection geometry with the axis constraint. to Snap the contrains axis to the intersection of the face or edge.Feb 20 2020, 12:17 AM
Germano Cavalcante (mano-wii) retitled this revision from Snap the contrains axis to the intersection of the face or edge to Snap to the intersection between the contraint axis and the face or edge.Feb 20 2020, 11:20 PM

Hi guys,

I saw the good news about the move with basepoint feature. Great Job! =)
Sorry for bothering but there is hope for snap to axis constraint also?

(...) there is hope for snap to axis constraint also?

Hardly for blender 2.83

  • Cleanup: remove uninitialized variables
  • Improve snap to constraint plane
  • Use snap_target instead center_global
  • Cleanup: rename variables and comments
  • Fix constraint_axis_to_...
  • Test constraint_plane_to_face alignment
Germano Cavalcante (mano-wii) retitled this revision from Snap to the intersection between the contraint axis and the face or edge to Transform: Snap to the intersection between the constraint and the geometry.Jun 15 2020, 3:34 PM
Germano Cavalcante (mano-wii) edited the summary of this revision. (Show Details)

Tested and works well, think this is what users expect. Previous behavior doesn't seem all that useful, the only time you might want the old behavior makes some sense with vertices, (to project onto a flat plane at the same depth as the vertex), but that hasn't changed - so LGTM.

This revision is now accepted and ready to land.Jun 18 2020, 3:28 AM