MoI discussion forum
MoI discussion forum

Full Version: Is it possible to configure straight snap to only snap to surface normals?

From: silverwoods
28 Oct 2018   [#1]
When I'm placing cylinders (prongs) on a model using the Orient Line to Line command, I would like it if straight snap would only pick up the surface normal at a point, not the vectors parallel to x y and z. The other straight snap directions only get in the way. Is there a way to do this? Thanks in advance!
From: Frenchy Pilou (PILOU)
28 Oct 2018   [#2] In reply to [#1]
You can't use some Helpers Lines ?
From: silverwoods
28 Oct 2018   [#3] In reply to [#2]
I'm not sure I understand...

I often use construction lines or projected lines as well as arraying using symmetry or arraying along curves. Sometimes I can flow a field of stones and prongs over a surface if the curvature is not too bad, but in other cases it is more convenient to place the prongs / stones free hand if model geometry is not symmetrical or has high curvature.

In those cases the fastest workflow I have is to build a prong oriented in the Z direction along a base line and use the line to line command to drop copies normal to the surface. However, the process is impeded when straight snap picks up the xyz directions from the point on the surface. It would be a lot faster if the only snaps active were the on surface snap and to pick a point on the surface, and the normal snap to define a target line along the surface normal at that point.

The pic shows a typical application.




Image Attachments:
bubble letter.jpg 


From: Frenchy Pilou (PILOU)
28 Oct 2018   [#4] In reply to [#3]
Yes! But one by one! :) Maybe there is a Plugin By Max Smirnov! ;)
(i come back in 5 minutes) Edit Yes it's Dispersion ! http://moi3d.com/forum/index.php?webtag=MOI&msg=6486.1

else for the one by one...

That is for that the Function Orient / Line-Line is made! ;) (my favorite function :)
The Helper Line "Normal" give you the Normal of the Point on the surface for draw your object! ;)

Here the normal point is the "White bottom Point" ! (not the black cross : it's just hasard that it was aligned)
You can have Uniform, Stretch or No Resize Size's Cylinder ! & (Copy or not)
Normal is "Normale" because I use a French version of Moi! ;)







By Max Smirnov
From: silverwoods
28 Oct 2018   [#5] In reply to [#4]
Thanks, Yes, this is what I am doing now- however, the process is slowed down because the cursor keeps picking up the x,y,and z helper lines. Is there a way to turn off the x, y and z helper lines? In this workflow they are only slowing the process down. If I could turn of those helper lines, making the surface normal the only helper line available, it would make it easier and faster to pick out. As you can see any little savings is nice when there are several hundred stones and prongs to do!

Edit: thank you for pointing out the dispersion script, I will see if it can be helpful
From: Frenchy Pilou (PILOU)
28 Oct 2018   [#6] In reply to [#5]
I am confident of the Max scripts! ;)
From: Michael Gibson
28 Oct 2018   [#7] In reply to [#1]
Hi silverwoods, there are some settings under Options > Snaps > "Straight snap options" that can get you close to what you want.

If you uncheck "Vertical snapping" that will disable the z direction snap. The Tangent and Perpendicular options are for when the first point is on a curve, those can also be disabled.

Then the remaining x and y snaps are controlled by the "Snap angle" option. By default it is 90 degrees meaning you'll get snaps at each 90 degree increment from the x axis. If it was set to 45 degrees you'll get 8 straight snaps in the x/y plane, etc... You can set it to 0 which will make only the x-axis snap and effectively disable the y axis snap.

So with that you should end up 2 straight snaps happening, surface normal and x axis. Hope that helps you for now.

I'll see about disabling the x-axis snap too when snap angle is set to 0 for the next v4 beta.

- Michael
From: silverwoods
28 Oct 2018   [#8] In reply to [#7]
Great, that is a big help, thank you!
From: silverwoods
28 Oct 2018   [#9] In reply to [#8]
Another question- Would it be possible to write a script that functions similarly like orient line to line command which places copies of an object oriented to the surface normal at a point without having to pick up the surface normal? I.e., the normal direction is already pre-selected? So that using each click I can select a point on the surface, and the script will repeatedly place a copy of the prong centered at that point and oriented normal to the surface at that point?
From: Frenchy Pilou (PILOU)
28 Oct 2018   [#10] In reply to [#9]
Sorry I can't write script myself ! But if Max or other scripts' creators see your request...
From: Michael Gibson
28 Oct 2018   [#11] In reply to [#8]
Hi silverwoods, the regular "Orient" command, the one to the left of Line/Line can work like that.

Set the "Make copies" option and then you will be able to place many target points onto a surface, each target point will automatically align to the surface normal and there is a second stage where you can adjust the rotation, but if you do not want to do that you can just right click at that point. So you would just do a left click on the surface and then a right click anywhere in the viewport for each one.

- Michael
From: silverwoods
29 Oct 2018   [#12] In reply to [#11]
Oh my... its wonderful! Thank you!