![]() |
【转帖】problem transforming some arcs in 1.14.01
problem transforming some arcs in 1.14.01
problem transforming some arcs in 1.14.01 hi, attached please find 2 drawing files with arcs. in version 1.13 we were able to transform the arcs by using parcentity->transformby(matrix) without any problems. in version 1.14.01 it now returns "ecannotscalenonuniformly". does anyone know why is this happening and how it can be fixed. thanks. harbinder attached files and what matrix do you apply for transforming? the same as in 1.13? arc entities can't be transformed by non-uniscale or non-ortho matrix (which would produce ellipse from arc). gettransformedcopy() can be used in such case (returning odgeellipse). sergey slezkin quote: originally posted by sergey slezkin and what matrix do you apply for transforming? the same as in 1.13? yes of course the same matrix we used in 1.13. we only noticed after our regression tests started to fail after upgrading to 1.14.01. this is how we obtain the matrix and apply to the entity. code: odgevector3d normal = pentity->normal(); odgematrix3d mat = odgematrix3d::worldtoplane(normal); pentity->transformby(mat); this is dd bug - the matrix is incorrectly checked for being uni-scaled. btw, what's the purpose of code: parc->transformby(odgematrix3d::worldtoplane(parc->normal())); sergey slezkin quote: btw, what's the purpose of code: parc->transformby(odgematrix3d::worldtoplane(parc->normal())); basically we want the arc parameters like center, radius, start angle, end angle etc after the extrusion has been applied to it. center is always returned in wcs. radius does not depend on wcs/ocs. and start and end angles are always measured in ocs (ccw from ocs x axis).... sergey slezkin quote: originally posted by sergey slezkin center is always returned in wcs. if center is always returned in wcs then why is the center different before and after the arc entity is transformed by the matrix? because transformby changes wcs position of center. just like it changes the position of any point (in common case). odgepoint3d a; a.transformby(m); // now a is multiplied by matrix m sincerely yours, george udov thank you all for the help. i was able to fix the problem we were having issue with ellipses, arcs and inserts and 'normals' hallo is there a simple explanation how i can calculate all the relavant points (center,radius, start and angles) of various entities when the normal of the entity is not equal to odgevector3d::kzaxis? regards anton heymann odgematrix3d::worldtoplane(odgevector3d normal) and planetoworld() methods return transformation matrices between world coordinate system (wcs) and object coordinate system (ocs). but radius would be the same and angles are always measured from ocs x axis around the normal (in the object's plane). sergey slezkin |
所有的时间均为北京时间。 现在的时间是 02:17 PM. |