![]() |
【转帖】odgevector3d and angleto
odgevector3d and angleto
odgevector3d and angleto maybe, i am wrong, but i believe odgevector3d v(0, 1, 0); v.angleto(odgevector3d::kxaxis, odgevector3d::kzaxis); should return pi / 2, but it returns 3 * pi / 2 v.angleto(odgevector3d::kxaxis) returns, as estimated, pi / 2. (with version 1.14) woho it must return 3*pi/2 in this case. and it returns it. from odgevector3d.h: code: /** description: returns the *angle* to the specified vector. arguments: vect (i) any 3d vector. remarks: if refvector is not specified: o returns a value in the range [0.0 .. odapi]. o this function is commutative. if refvector is specified: o returns a value in the range [0.0 .. oda2pi]. o if (refvector.dotproduct(crossproduct(vect)) >= 0.0, the return value is angleto(vect). o if (refvector.dotproduct(crossproduct(vect)) < 0.0, the return value is oda2pi - angleto(vect) */ sincerely yours, george udov i met the same issue. the reference documentation of dwgdirect reports quote: remarks if refvector is not specified: returns a value in the range [0.0 .. oda2pi]. this function is commutative. if refvector is specified: returns a value in the range [0.0 .. oda2pi]. if (refvector.dotproduct(crossproduct(vect)) >= 0.0, the return value is angleto(vect). if (refvector.dotproduct(crossproduct(vect)) < 0.0, the return value is oda2pi - angleto(vect) there's a typo indeed, autocad measures angles considering not only their sides, but their extensions too. mirkopontrelli, this is a misprint in documentation, that is already corrected. sincerely yours, george udov yep, i am gonna download it at once. |
所有的时间均为北京时间。 现在的时间是 09:39 AM. |