6
$\begingroup$

I'm looking for a precise way to measure angles in blender. The ruler/protractor tool is very limited with the snap to vertex frequently failing in edit mode and only showing two digits beyond the decimal point when it does work.

Are there any addons that will let me do something like select two points and measure their angle relative to the 3D cursor? (preferably with the ability to attain more than two significant figures beyond the decimal point - somewhere beyond 6-8 would be ideal, but even just a smoother workflow than that damned ruler/protractor tool built into Blender would be amazing to have)

$\endgroup$
  • 9
    $\begingroup$ Actually, Ruler/Protractor tool is able to get angle value with 8 digits, press Ctrl C to copy that value. It just didn't show the full digits by design. BTW, please avoid using grumble words like "damned" in the question, to show some respect to the one who make the tool for free. $\endgroup$ – Leon Cheung Feb 2 '15 at 7:07
  • $\begingroup$ The Ruler/protractor tool does not work in a remotely nice way as I outlined in the post. Don't mean to be disrespectful toward the developers - for a free 3D editor Blender is amazing - the precision and speed of use to call it a CAD program however is lacking significantly. $\endgroup$ – CoryG Feb 5 '15 at 18:47
1
$\begingroup$

When in edit mode press N and then select Mesh display> angle. Then take a vertex and move it.

$\endgroup$
  • $\begingroup$ Never been able to figure out what those angles actually relate to. I'm looking for something that can be based on three arbitrary points (like the ruler, but actually defined from vertices or intersections or the 3D cursor, not loosely snapped along edges/objects) - the display > angle feature seems to be the relation of the angle of an edge to some arbitrary azimuth unless I'm missing something. $\endgroup$ – CoryG Feb 5 '15 at 18:49
0
$\begingroup$

I think you should use this addon:

https://github.com/YHOYO/mesh_doshape_tools/blob/master/mesh_doshape_tools/calc_largosyangulos.py

you only need select 3 vertices and this will show you two messages

1 to angles

2 to lengths

a fast video about how this work:

https://www.youtube.com/watch?v=zxm2EaJd_uM

also this will print all data for console

may be do you want another feature?

$\endgroup$
0
$\begingroup$

I ended up starting on some modifications to the dynamic spacebar code for technical drawing and threw this in as well, if anyone is interested here are the changes for /scripts/addons/space_view3d_spacebar_menu.py to produce a quick copy-angle-to-clipboard function on the dynamic spacebar menu (takes the cursor as the centerpoint and the angle between two selected objects - only works along the X/Y axis and ignores Z):

def copyAngleToClipboard(context, operator):
from math import fabs, pi, pow, sqrt
if len(context.selected_objects) != 2:
    operator.report({'ERROR'}, "Two objects must be selected")
    return None
obj = context.selected_objects[0]
obj2 = context.selected_objects[1]
if (obj.type != "CURVE"):
    operator.report({'ERROR'}, "Both selected objects must be curves")
    return None
if (obj2.type != "CURVE"):
    operator.report({'ERROR'}, "Both selected objects must be curves")
    return None

cx = context.scene.cursor_location[0]
cy = context.scene.cursor_location[1]
p1x = obj.location[0]
p1y = obj.location[1]
p2x = obj2.location[0]
p2y = obj2.location[1]
a1 = point2dAngle(cx, cy, p1x, p1y) * (180 / math.pi)
a2 = point2dAngle(cx, cy, p2x, p2y) * (180 / math.pi)
a = a2 - a1
if a1 > a2:
    a = a1 - a2
operator.report({'INFO'}, str(a))
context.window_manager.clipboard = str(a)
return

class VIEW3D_OT_CopyAngleToClipboard(bpy.types.Operator):
"Copies the angle centered at the cursor between two selected objects to the clipboard"

bl_idname = "view3d.copy_angle_to_clipboard"
bl_label = "Copy Angle to Clipboard"

@classmethod
def poll(cls, context):
    if len(context.selected_objects) != 2:
        return None
    obj = context.selected_objects[0]
    obj2 = context.selected_objects[1]
    return obj != None and obj2 != None

def execute(self, context):
    copyAngleToClipboard(context, self)
    return {'FINISHED'}

Then inside of VIEW3D_MT_CursorMenu and VIEW3D_MT_EditCursorMenu add the following two lines at the end (or wherever you want in the list):

layout.separator()
layout.operator("view3d.copy_angle_to_clipboard",
                    text="Copy Angle to Clipboard")
$\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.