Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Sep 2007
    Location
    Sydney, Australia
    Posts
    69

    How to measure distance between two vertices in different objects ?

    Hi, sorry if this is an obvious question or has an obvious answer that has been answered somewhere else. I have tried looking around the forums and elsewhere on the web, but haven't seen a clear answer. I'm fairly new to Blender, but not 3d visualisation software.

    I have two objects, and I'd like to translate one object so that one of the vertices of object 1 is at exactly the same co-ordinates as a vertex on the other. I'm quite unclear as to how to do that - what I'd like is to be able to obtain the delta x, y and z co-ordinates of the distance between them, and then move the object by that amount.

    Is there an easy way to achieve this, or do I need to venture down the path of Python scripts or suchlike ? Hoping someone can reveal the answer, or point me to a url with all the secret knowledge of the finer points of measuring and moving vertices. Thanks for reading this far.

    Wolf



  2. #2
    Member _E2_'s Avatar
    Join Date
    Sep 2007
    Location
    Lithuania
    Posts
    13



  3. #3
    Member
    Join Date
    Sep 2007
    Location
    Sydney, Australia
    Posts
    69
    Thanks to all who replied, both here and privately. Looks like scripting is the way to go, so I shall investigate this aspect in general first and then see what I can do with the solutions to my specific problems. I appreciate you taking the time to help.

    regards,

    Wolf



  4. #4
    Member Syziph's Avatar
    Join Date
    Feb 2007
    Location
    Blenderia
    Posts
    757
    You can create an edge and snap both ends to the desired locations using 3D cursor.
    Then in Mesh Tools 1 enable Edge Lenght option - it will display the edge length in BU (blender units).



  5. #5
    Member
    Join Date
    Sep 2007
    Location
    Sydney, Australia
    Posts
    69
    Hi Syziph,

    Thanks for the suggestion. Let me just see if I understand this ;-

    1. Create a new plane, delete two vertices so I end up with an edge.
    2. Select vertex 1 from object a
    3. Shift-S and do a cursor to selection
    4. Select vertex alpha from my new edge from 1
    5. Shift-S and do a select to cursor. This moves the first bit of my edge to the first object
    6. Repeat the above with object b and the other vertex from my edge so that the new edge now joins the two objects.
    7. Do the mesh tools 1 - edge length option to find out the delta x, y and z
    8. Select the vertex on the object I want to translate and do a 'N' on it to get the x, y, z co-ordinates
    9. Do a grab on the object, using a combination of edge length deltas and the x, y and z co-ords ?
    10. Delete my new edge created in 1. above

    Now, that should work, and has the advantage that I don't yet need to get to grips with scripts, but (and excuse me if this seems ungrateful ) does seem to involve quite a few steps for what is a fairly simple type of requirement. Have I missed something and am complicating things ?



  6. #6
    Member Fligh's Avatar
    Join Date
    Dec 2002
    Location
    Here
    Posts
    10,428
    Snap the Cursor to Selected vert on Object 1 in Edit mode.
    Tab to Object mode.
    Select Object 2 and Tab to Edit mode
    Select vert and Extrude.
    Snap Selected to Cursor
    Select the Edge and view the EdgeLength
    Delete extruded vert.

    %<
    BLENDER - You'll get it when you get it.



  7. #7
    Member IamInnocent's Avatar
    Join Date
    Mar 2002
    Location
    Montreal, Qc, Canada
    Posts
    2,749
    Theeth giva us transformation snaps...
    http://www.blender.org/development/r...ransform-snap/

    1- Select the transform snaps (the icon with the magnet.) and set it to 'Closest'
    2- Select both objects
    3- Tab for EditMode
    4- Select the first vertex and extrude it toward the second, holding Ctrl, until it snaps to the right place.
    5- Select that edge and read if you want: I'd rather use a script, Macuno's Caliper script being the most versatile and reliable
    http://www.alienhelpdesk.com/python_scripts/caliper

    Notice that I'd rather use Macouno's script since the 'Edge length' function will give false results if the Object in EditMode happens to have been scaled to something else than X, Y, Z = 1.

    Repeating 2 to 5 is fast enough and knowing how to use both, the transform snaps and the script is very useful knowledge.
    Last edited by IamInnocent; 01-Oct-07 at 00:33.
    -----------------------------------------------
    If you never break any rule then the rules will break you.



  8. #8
    Member Syziph's Avatar
    Join Date
    Feb 2007
    Location
    Blenderia
    Posts
    757
    WolfOfBadenoch, I tought that you want to know how to measure a distance between two points as priority. Revising your first post - you just want to snap a point of an object to point from another one and translating the whole geometry. So here is my revised answer

    I variant (meshes are different objects):
    Select a point from the first object - snap the 3d cursor to the selection
    Add an Empty in object mode select it and do the Selection to Cursor
    Parent the object to the Empty.
    Select a point from the second object - snap the 3d cursor to the selection
    In Object mode Snap the Empty to the Cursor.
    Unparent and delete the Empty.
    (another way is to locate the pivot point to the vertex location with Center Cursor, then place the 3D cursor over the target vertex and then do the Selection to Cursor)

    II variant (meshes are in the same object):
    Select the mesh you want to translate
    Using 3d transform manipulator position the mesh so the vertices you want to snap are very close to each other
    Enable Snap or Grid tool (the magnet icon) with Closest option enabled
    Grab the selected mesh and point at the target vertex with CTRL pressed
    The meshes will snap firmly

    So for those manipulations there is no need for sofisticated calculations. And the procedures aren't so slow.
    I think that Blender will have more options for snapping maipulations in the future.
    We'll see
    Last edited by Syziph; 01-Oct-07 at 03:16.



  9. #9
    Member
    Join Date
    Sep 2007
    Location
    Sydney, Australia
    Posts
    69
    Dear all, thanks again for taking the time. I'm having a few issues working out these scripts, but I will persevere. The magnet icon tip is very handy also - I'll use that a lot I think. And thanks again Syziph, your comments about emptys are good too, and will be used !

    Wolf



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •