Straighten Edge

68 votes
Author Name: 
Royal Ghost

Straighten Edge – MAX script, allows to project and after it to place selected vertex/edges on the given straight line on the Editable Poly object, Edit Poly modifier and Editable Spline & Line objects.

v1.5.1 (13.10.2019)
– Fixed bug when constrains mode doesn’t works with Edit Poly modifier
v1.5.0 (30.09.2018)
- Fixed bug in constraint mode when verteces not align properly (constraint mode works in World coordinate system)
v1.4.0 (01.02.2009)
- Added restrictions of straight. Use SHIFT key to get straight with axis constraints.
- Now snap mode and type are restored after straighten. When straighting begins, snap mode changes in active and snap type in 3D.
v1.3.0 (05.08.2008)
- Added normalize when straight. Use ALT key for get vertexes/edges normalized.
v1.2.0 (23.05.2008)
- Added support for Edit Poly modifier
- Added support for Editable Spline & Line objects (vertex only).
v1.1.1 (21.08.2007)
- Fixed bug when vertexs are not placed properly when Constraints is on
v1.1 (16.05.2007)
- Added support to work with edges
- Added support for modifiers over Editable Poly baseobject
- Now after vertex/edges straightend snap mode off

Version Requirement: 


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Fredblub's picture

Hey, thanks a lot! The

Hey, thanks a lot! The replaced fonction works great!
No regret for the lost rubber band since I do not have to drop my pen for the moose anymore.
You did that fast and efficiently
Thanks again!

Royal Ghost's picture

Tablet Edition

Fredblub: It seems another :/ max bug. Seems pickPoint maxscript function doesn't work properly. I created "Tablet Edition" where replace broken pickPoint with another working function. Please try attached sedget.mcr!

Also I recommend submit as a bug to Autodesk about this broken function.

p.s. About not proper work of constraint mode - sorry, still no fixed

Royal Ghost |

Fredblub's picture

Pen Tablet

Hi there,
I'm working Max 2010, using a pen tablet full time 'cause i find it more natural than my 2 fingers waiting to click above theirs buttons. It works fine in every manipulation I do, except for your great script that I use a lot : once I've selected my verteces and choosen your tool, it's almost impossible to catch the end verteces, unless you click for a dozen times (if lucky). No settings of the tablet would change that matter of fact. I'm using an Intuos 4L last generation.
Any clue?

Playdo's picture

Select only vertices/edges and not the end points + constrain?

Hi Royal Ghost. I've been looking for a script similar to this for a long time. Is it possible to script it so that you only select the line of vertices or edges and then run the script? So instead of having to click on the two end vertices, it will just straighten between the end points of the line. And to also be able to constrain it to Edge/Face?

I know that this is what Straighten in Graphite Tools, Loop Tools does, but unfortunately you can not constrain it to Edge/Face mode, which would be so useful.

I'm not a coder, so I've looked everywhere for this script but have not found one.

Royal Ghost's picture

I have found why vertexes are

I have found why vertexes are not straighten when axis constraint mode active. I need more time to fix algorithm of straighten to get it work. :(

Royal Ghost |

grasshopper's picture

Thanks for the script it's

Thanks for the script it's really handy.

Like Royal Ghost I to am having problems with the axis constraint to, it just doesn't want snap to the vertex's. I am using max design 2010.

Cobra's picture

Hi Everyone, I can't get this

Hi Everyone,

I can't get this script to work at all.
I am using Max 8

Can someone help me :)

Thank you.

jsrocha's picture

Hi Royal Ghost, thanks for

Hi Royal Ghost, thanks for your reply. About the shift key problem, is it possible to separate the script in two? i mean, one for simple alignment, and other to alignment with axis constrain. Instead of have to press another key, you can have another script to do that. What do you think about it?
The alignment problem is a minor one, but i´ve made a simple max scene where you can see what i´m talking about. In the scene are two extruded arc (one is the copy of another), which i moved some vertices in z. go to the front viewport, and then you´ll see that the arc at left doesn´t have the edges perfectly aligned (there´s a spline connecting the vertices, helping to see the problem). The arc at right is much better aligned (maybe not perfect), cause i used the script twice on that arc. the max file is attached below..
thanks man, i really hope you can find a solution to the shift key problem, cause i can´t live without this script anymore :-)
best regards,


straighten_edge.max 96 KB
Royal Ghost's picture

Hello jsrocha. I have checked

Hello jsrocha. I have checked your remarks and have found:
1. I have the same problems with Shift key, it seems to me it is problem of max. Perhaps the solve of this problem will be the change Shift with something else.
2. I can't reproduce alignment problem. Probably it is connected with non commited vertexes transformations. Could u share a simple scene with this problem?

I'm glad that you have found this script useful. :)

Royal Ghost |

jsrocha's picture

Hi Royal ghost, first of all,

Hi Royal ghost, first of all, thanks for this script, is a very handy one. I have two comments: first, for me is very difficult to pick the vertices when i´m holding shift key, for axys constrain. I need to click several times to get the vertices selected. It happens to you too? Am i doing something wrong? second, when i use axis contrain (z for instance), i noticed that the vertices doesn´t get perfectly aligned, i need to run the script again to get better results (not perfect yet, but the diference is very subtle). Have you noticed too?
ok man, that´s it, thanks again for this very useful script!

Jsrocha - Brasil

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.