ScriptSpot home

Forum topic · Scripts Wanted

The missing snap function

By Kien · 2008-04-07

Description

The only snap function that I miss is the ability to snap to intersections that at least intersects in 2d viewports. Meaning that if I look in the top view and I see 2 lines/edges intersecting in XY but not in Z I should still be able to snap to their intersection.
Here is the forumla for calculating the intersection of 2 lines in 2d.
http://en.wikipedia.org/wiki/Line-line_intersection

I know almost nothing about max scripting but the method I'm thinking of is to make the cursor search for 2 edges in the snap radius and then use their coordinates in the forumula (remeber that the edges has limited length and does not need to intersect even though they are not paralell) and see if they intersect or not, and if they do, it will snap to their intersection point.

Many thanks if anyone am willy to make this script.

Comments (5)
rachka

such script would be very helpful!

Fredrik

This would help me a lot

I'm currently trying to do some spline modelling and am having the exact same problem, it would be a lot easier if I could snap to an intersection. If anyone has found out a way to do this, could you please let me know.

bpositive

Yes, me 2

I have been needing this function many times as well.

jlsz

this is a funcition i have been looking for, for so long now hope anybody could help with this one.