I there a way to move multiple vertices preserving a straight line


I have a mesh where one side is tilted (marked red in the image):
What I want to do is move selected vertices along the red line so that bottom line (marked white in the image) remains straight . When I move the selected vertices along the red line’s local axis the bottoms line is getting bent in the middle.
What I want is to move the selected vertices and get the bottom line rotated as one straight line. I just worked around by adding another straight edge. rotating it, subdividing it in the middle and then replaced the old edge with the newly created one.

I’m not sure if it would work exactly as you are hoping, but in some similar situations the Shear operator might work. I’d take a look at that:
https://docs.blender.org/manual/en/latest/modeling/meshes/editing/transform/shear.html#shear

Nope, the Shear tool didn’t work in this case. I’ve attached the project file so you could take a glance at it and better understand what I wanted. Although I already worked it around, I’m wondering if there’s a tool / trick to treat a subdivided edge as one straight edge, ignoring the subdivisions in the middle.

It’s difficult because it would not only have to move points in the direction you are telling it to move them, it would also have to move some points closer together, as the overall length of the line has shortened.

What if you only move the 4 points grouped together in a square. Then connect the bottom left point of that square to the unseen point off camera to the left with J. Then merge the point which wasn’t moved with the new intersection?

You move first, and then you select the vertices that you want to align and use Loop tools addon, flatten.
https://www.google.com/search?q="blender"+"loop+tools"+"flatten"

As YAFU suggested , you can use Loop Tools addon to get straight line and no need to add extra vertices
BlenderQus.wmv (588.4 KB)

Or you can simply move to the position you like, then select the line you want to have straight, then hit S (scale) then Z (if it’s the z axis that you want to straighten out) then 0 (zero).

Vertex slide seems to offer a particular behavior that may be closer to the desired result than the usual way of sliding an edge loop. Other than that, knife tool seems like a more direct approach to producing the kind of alignment you’re looking for, although it requires re-working a mesh from the new geometry.