4
$\begingroup$

I'm modeling an object to print with a 3D printer. I'm working with a UV sphere and I've removed some bands at the top and the bottom half. What matters, in terms of size, is the band at the top, the one with all the vertices selected in this photo:

enter image description here

The height and diameter at the bottom either don't matter or aren't as important. How can I easily and quickly check the diameter of this one band at the top of the object? I do not want to just use a measure tool, since it can be hard to get a precise measurement with it. Since I'll be resizing, then checking, then resizing until I get it just right, I would really like to find a way to do this quickly and with minimal steps.

$\endgroup$
11
  • $\begingroup$ hmmm.. while the loop is selected you could press P and choose selection which would create a new object with that ring. tab out of edit mode and select the new object ring and press N in object mode. Then under Item tab you can see the dimensions of this ring. $\endgroup$ Jul 7 at 6:40
  • $\begingroup$ That works. I leave the tab with "Item Information" open anyway. (Sorry, don't know the right terms for that!) That shows the information right away, then I can undo selecting the new item and making it a separate item. It'll be interesting if there's anything quicker. $\endgroup$
    – Tango
    Jul 7 at 6:46
  • 1
    $\begingroup$ @HarryMcKenzie I saw you had an answer with a Python script, but the measurement trick does it. I've been using it for the past week to do quick measurements, but had no idea you could snap with Ctrl. If you want to write that as an answer, I'll select it. $\endgroup$
    – Tango
    Jul 7 at 7:15
  • 1
    $\begingroup$ @Mentalist Good point! I learned that early on and am used to resetting the scale, rotation, and location (all transforms) regularly with everything I'm working on. I ran into a lot of problems before I started doing that. I do find, for some procedures, it helps to be able to use the scale while making changes, but once I get to a certain point, I know I have to apply all the transforms. I'm glad to hear I'm not the only one using Blender for printing - there are a number of 3D things I want to do and it makes sense to use 1 program for all of them. That includes printing and CNC work. $\endgroup$
    – Tango
    Jul 8 at 5:52
  • 1
    $\begingroup$ You may want to add cad transforms to you add-on list great for measurements blender-archipack.gumroad.com/l/nQVcS $\endgroup$
    – Rick T
    Jul 18 at 5:11

2 Answers 2

5
$\begingroup$

Make sure you open the System Console by going into menu Window -> Toggle System Console. Go to the Scripting Tab and create New text file and paste the script. While you have selected the loop you want to measure, click the Run Script button. You will see the output in the system console.

enter image description here

import bpy
import math

obj = bpy.context.active_object 
circumference = 0

edges = [e for e in obj.data.edges if e.select == True]
verts = obj.data.vertices
for edge in edges: 
    circumference += (verts[edge.vertices[0]].co - verts[edge.vertices[1]].co).length
 
print("diameter = ", circumference / math.pi)

NOTE: Make sure you tab out into Object mode and tab back into Edit Mode whenever you make a change before running the script again.

Actually doing the measurement tool is quite accurate, you can snap the ends of the measurement tool line using Ctrl while dragging, you can snap the ends to the vertices on opposite ends.

$\endgroup$
5
$\begingroup$

You could enable the Curve Tools addon, duplicate and convert your edge loop to curve, select it in Edit mode, go into the N panel > Edit > Curve Info, click on Length:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.