Hey,

 I still have some issues, sorry to bother .

I am not able to rotate the object along the edge.  The angle you said to 
find (between the axis of the object and Ve) gives only angle between one 
axis. I was able to align only those edges which were perpendicular to Y 
axis.

I have to find the angle of the object for every axis.

so I am again back .. trying and trying. 

Here is my code.

# to place the Helix along to the edge.
# v0 to v1(between the vertex 0 and vertex 1(
v0=shape.vtx[0].getPosition()
v1=shape.vtx[1].getPosition()
cen01=v0.center(v1)
#Scaled psolid1 to 5 so even the points in the cordinates are shifted by 5
cen=5*cen01 
move("vHelix1",cen)
vh1=pm.PyNode('vHelix1')
pvh1=vh1.translate.get()
v01=v1-v0(vector Ve)
r=angle(v01,pvh1)
d=math.degrees(r)
rotate("vHelix1",d)


Hope someone can explain...

Thank You






-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to