For those times your dimension string text flips upside down, here's a little script to reverse the
For those times your dimension string text flips upside down, here's a little script to reverse the vertices of the dimension, so the text reads correctly again.
import bpy
import bmesh
obj = bpy.context.edit_object
bm = bmesh.from_edit_mesh(obj.data)
# Find the selected edge loop
edges = [e for e in bm.edges if e.select]
verts = []
if edges:
edge = edges[0]
v1, v2 = edge.verts
visited = {v1}
verts.append(v1)
current = v1
while True:
link_edges = [e for e in current.link_edges if e in edges]
next_vert = None
for e in link_edges:
other = e.other_vert(current)
if other not in visited:
next_vert = other
break
if not next_vert:
break
visited.add(next_vert)
verts.append(next_vert)
current = next_vert
# Reverse the order by duplicating vertices and reassigning edges
for i in range(len(verts)//2):
verts[i].co, verts[-1-i].co = verts[-1-i].co.copy(), verts[i].co.copy()
bmesh.update_edit_mesh(obj.data)
Comments
Made it a small plugin. AI was involved. :)