text shape help

Hello,
I just want to mesure angle between two selected polys and create a text in the middle of the common edge (by clik).
If anybody can help : I don't know what I do wrong... :-( Thanks.
-------
obj = $
a= polyop.getFaceSelection obj as array
XX= polyop.getFaceNormal obj a[1]
YY= polyop.getFaceNormal obj a[2]
theAngle = acos(dot XX YY )
pta = pickpoint snap:#3d
txt=text()
txt.texte = theAngle as string
txt.pos = pta
-----

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
titane357's picture

ooops sorry.... it is a Max

ooops sorry....
it is a Max super stupid "bug?" :
i tested my script on a two face poly : when all faces are selected, the snapping don't works... I remember I have the same problem to snap SlicePlane tool on a vertex....

titane357's picture

little error.. in

little error..
in txt.text
-------
obj = $
a= polyop.getFaceSelection obj as array
XX= polyop.getFaceNormal obj a[1]
YY= polyop.getFaceNormal obj a[2]
theAngle = acos(dot XX YY )
pta = pickpoint snap:#3d
txt=text()
txt.texte = theAngle as string
txt.pos = pta
-----

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.