Thank you Martin for your help. I thought there was a quick/direct solution that I overlooked but this definitely helps. Thank you
And there is this old post, that says you can use MeasureIt for that: https://blender.stackexchange.com/questions/1674/how-to-get-selected-edges-length
If you want the radius of a ring like that you can use the MeasureIt extension:
You'll have to go into vertex mode and select three vertices on the ring you want to measure and then in the extension (under view in the n-panel) click on "Arc". It will the show the radius, length and angle of the arc. Make sure you click on "show" in the extension, otherwise you won't see anything.
If you want to go the python route:
import bpy
# Get the active object
obj = bpy.context.active_object # Check if the object is a mesh if obj.type == 'MESH': # Enter edit mode bpy.ops.object.mode_set(mode='EDIT') total_length = 0 # Get the selected edges edges = [e for e in obj.data.edges if e.select] # Calculate the length of each selected edge for edge in edges: v1 = obj.data.vertices[edge.vertices[0]].co v2 = obj.data.vertices[edge.vertices[1]].co length = (v2 - v1).length #add the edge lengths together total_length = total_length+length #Print the total length to the console print(f"Total length: {total_length}")
This will output the total length of selected edges. I don't know why but for some reason you have to go to object mode and back into edit mode for blender to detect the change to the selected edges. It's probably because of my method of determining selected edges. It's the only thing I could come up with. So, I added a mode set to edit. This way you can just select your edges tab to object mode and run the script. Now that I'm typing this I could have just switched to object mode instead. I think.
bpy.ops.object.mode_set(mode='OBJECT')
I haven't tested that. The script does work in object mode. For windows user to access the console click windows->Toggle System Console. For Linux user you can add "-con" without the quotes after running ./blender in the terminal or if you have a menu item or desktop icon you can check run in terminal for the launchers properties. Sorry, Mac people I don't know on Mac, but I do know you can use the -con in terminal mode.
***Edit*** It works. So here is the change so you don't have to tab to object mode.
import bpy
# Get the active object obj = bpy.context.active_object # Check if the object is a mesh if obj.type == 'MESH': # Enter edit mode bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='EDIT') total_length = 0 # Get the selected edges edges = [e for e in obj.data.edges if e.select] # Calculate the length of each selected edge for edge in edges: v1 = obj.data.vertices[edge.vertices[0]].co v2 = obj.data.vertices[edge.vertices[1]].co length = (v2 - v1).length #add the edge lengths together total_length = total_length+length #Print the total length to the console print(f"Total length: {total_length}")