Straighten Edge

69 votes
Version: 
2.0.0
Author Name: 
Royal Ghost

Straighten Edge (maxscript) allows projecting and placing selected vertices/edges on the given straight line on the Editable Poly object, Edit Poly modifier, and Editable Spline & Line objects.

When the SHIFT key is pressed, vertices/edges will be straightened with axis constraints
in the chosen Reference Coordinate Systems. For how to use axis constraints, please read the 3ds Max help Using the Axis Constraints chapter.

When the ALT key is pressed, vertices/edges will be straightened and normalized in their distance/lengths.

The script works with the following objects / modifiers:

 

  • Editable Poly object
  • Edit Poly modifier
  • Editable Spline object
  • Line object

    Supported Reference Coordinate Systems:

  • World
  • Working Pivot
  • Parent
  • Screen
Additional Info: 

2.0.0 (03.04.2026) for 3ds Max 2025+ 

  • Rewritten and improved projection to line calculations 
  • Added support for constraints by axes of Working pivot, Parent, Screen, World 
  • Improved normalize calculations Removed script “Straighten Edge (Spline Undo)”, it not needed in modern versions of 3ds Max
  • Cleaned up and refactored code
Version Requirement: 
2025+
Video URL: 

Comments

Comment viewing options

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

Yes I realized that

Yes I realized that afterward, in my config,none of them was selected so if I recall correct, it didnt worked until I select one of the supported snap types.

Anyway, I will try the new version as soon as I can,

well done and thank you.

Royal Ghost's picture

Masquerade thanks for

Masquerade thanks for comment they are welcome.
You are mistaken while thinking that for the proper work vertex snap is needed. You can use any type of snaps (vertex,pivot,face...) but it is important that it will be 3D.
I have taken into consideration your suggestion and fixed script. Now snap mode and type restored after straighten. When straighting begins snap mode changes to active and snap type to 3D.
Also this beta includes other changes:
Added restrictions of straight. Use SHIFT key to config it.

http://www.veda3d.com/files/sEdge1.4.0beta.rar

Royal Ghost | veda3d.com

Royal Ghost | veda3d.com

masquerade's picture

Thanks Royal Ghost, It is a

Thanks Royal Ghost, It is a very nice tool. and turns out it is very useful.

Though in a rush, It took me a while to understand that it uses 3d snap and vertex snap must be checked in 3d snap settings. (I realized that it was already written in the comments after I figured it out myself) It also turns off snap mode even if you are already working with 3d snap. I myself not a frequent snap user while editing, but it may be nicer if it looks for the current snap settings and options, checks true the vertex option,stores it , checks true the vertex option and restores back after the straightening.

Dont get me wrong, I just try to help you fool-proofing that nice script, thank you.

 

Royal Ghost's picture

IN_human, снап

IN_human, снап включается то скриптом автоматом, а его тип удобнее самому выбирать.
Насчет normalize, уже давно сам хочу сделать но все никак не сяду :)
Пасиб за +1 ;)

Royal Ghost | veda3d.com

Royal Ghost | veda3d.com

IN_human's picture

+1  В некоторых

+1 

В некоторых ситуациях бывает полезней PolyBoost, тот только с лупами дружит.

По поводу снапов - их помоему надо через скрипт какраз включать, по фейсам и по вершинам.

Заодно подсмотрю как мышу скриптовать )))

Хотелось бы иметь опциональную возможность задавать рёбрам равную длину.

С нетерпением жду инструметов EdgesAlongSpline, EdgesParallel2Surface и EdgesTangentially2Faces )))

Royal Ghost's picture

abyjoe, you must use 3D snap

abyjoe, you must use 3D snap to get right point's coordinates

RaZeR, tnx :)

Royal Ghost | http://veda3d.com

Royal Ghost | veda3d.com

RaZeR's picture

молодца!

молодца!

abyjoe's picture

doesnt work for me... the

doesnt work for me... the selected vertices get alined only in X coordinate and not in line with the 2 picked Points but somewhere else on the viewport...

Comment viewing options

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