1

I want to align an object to an edge via Python.
I have an edge in the 3D space, the edge has a rotation, euler or quaternion, like a 3d object, but this edge is part of an object. I want to copy the rotation of the edge to a external object (like a cylinder).

This seams like what I want, but the result doesn't work. Align Object to Vector using python

Alfonso Annarumma
  • 257
  • 1
  • 3
  • 11
  • I've found the solution. To align to edge direction, you can use the script in this link: http://blender.stackexchange.com/questions/19533/align-object-to-vector-using-python But for the vector you must use "Vector=Vector2-Vector1" where the Vector1 e Vector2 are the coordinates in vector of the vertes of the edge. – Alfonso Annarumma Apr 15 '15 at 22:16

1 Answers1

1

I've found the solution. To align to edge direction, you can use the script in this link: Align Object to Vector using python

But for the vector you must use Vector = Vector2 - Vector1 where the Vector1 e Vector2 are the coordinates in vector of the verts of the edge.

Alfonso Annarumma
  • 257
  • 1
  • 3
  • 11