aaarhhhgggg....again, never mind...it is a simple as using MFnMesh 
getPolygonNormal method on worldspace. You can delete this thread if you 
want to.

El miércoles, 28 de abril de 2021 a las 4:47:47 UTC+2, Rudi Hammad escribió:

> oh, never mind...the id is not the face id, it is the vertex id, that why 
> the result where weird.
> Isn't really anything as simple as passing a face and getting the normal? 
> I know how to get eveything I need using vector operations but I thought 
> that maybe there is a direct method hidden somewhere in the api.
> Maybe not.
>
> El miércoles, 28 de abril de 2021 a las 4:24:15 UTC+2, Rudi Hammad 
> escribió:
>
>>
>> Hello,
>> I want to get the face normal of a polygon using the API. So tipically I 
>> get 3 vertices on a polygon, and to the cross vector, normalize, etc... but 
>> the MItMeshPolygon has a getNormal() method. So you give the id and an 
>> mvector to fill up and that is the normal polygon. Now this is what I don't 
>> get. Lets say you a one face plane and you rotate 90 degrees in X the 
>> vertices (not the transform). getNormal() returns the expected vector (0, 
>> 0, 1). However, if you rotate the transform 90 degrees  the result is (0, 
>> 1, 0) as if nothing happened.
>>
>> I tried al the MSpace possible but they don't do anything as expected. So 
>> I am not sure of getNormal() is supposed to work. 
>>
>> Cheers
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/90cf15d3-7608-48b9-9f4a-4dfcc494ad43n%40googlegroups.com.

Reply via email to