本帖最后由 作者 于 2009-9-4 23:49:10 编辑
刚刚发现AutoCAD 2006 和 2008 两个版本的GetVectorTo函数的结果是不一样的,情况如下: AutoCAD 2006 Point3d p1 = (0,0,0) Point3d p2 = (3,4,5) Vector3d v1 = p1.GetVectorTo(p2) = (-3,-4,-5) Vector3d v2 = p1 - p2 = (-3,-4,-5) Vector3d v3 = p2.GetAsVector() = (3,4,5) AutoCAD 2008 Point3d p1 = (0,0,0) Point3d p2 = (3,4,5) Vector3d v1 = p1.GetVectorTo(p2) = (3,4,5) Vector3d v2 = p1 - p2 = (-3,-4,-5) Vector3d v3 = p2.GetAsVector() = (3,4,5) 又被这样一个小东西害惨了!这样的小问题封装类真的不少!其稳定性比起C++的ObjectARX差远了! 从函数字面上理解,2006版更合适! |