1
$\begingroup$

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

$\endgroup$
  • $\begingroup$ I've found the solution. To align to edge direction, you can use the script in this link: blender.stackexchange.com/questions/19533/… 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. $\endgroup$ – Alfonso Annarumma Apr 15 '15 at 22:16
1
$\begingroup$

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.

$\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.